Changeset 138
- Timestamp:
- Apr 3, 2014, 8:09:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r137 r138 707 707 my $kind; 708 708 709 my $ret =GetOptions(709 GetOptions( 710 710 'kind=s' => \$kind, 711 711 ); … … 775 775 $computerdb->{$ip}{mac_address}, 776 776 $date; 777 next LOOP_ON_MAC;777 #next LOOP_ON_MAC; 778 778 } 779 779 … … 989 989 my $database_has_changed; 990 990 991 my $ret =GetOptions(991 GetOptions( 992 992 'day|d=i' => \$days_to_clean, 993 993 'verbose|v' => \$verbose, … … 1084 1084 my $format = 'txt'; 1085 1085 1086 my $ret =GetOptions(1086 GetOptions( 1087 1087 'format|f=s' => \$format, 1088 1088 ); … … 1576 1576 my $verbose; 1577 1577 1578 my $ret =GetOptions(1578 GetOptions( 1579 1579 'day|d=i' => \$days_to_dead, 1580 1580 'format|f=s' => \$format, … … 1733 1733 1734 1734 sub cmd_search_mac_on_switch { 1735 my $switch_name = shift || q{}; 1736 my $mac_address = shift || q{}; 1735 @ARGV = @_; 1736 1737 my $verbose; 1738 1739 GetOptions( 1740 'verbose|v' => \$verbose, 1741 ); 1742 1743 my $switch_name = shift @ARGV || q{}; 1744 my $mac_address = shift @ARGV || q{}; 1737 1745 1738 1746 if ($switch_name eq q{} or $mac_address eq q{}) { … … 1740 1748 } 1741 1749 1750 $mac_address = normalize_mac_address($mac_address); 1742 1751 $switch_name = join(',', map {$_->{hostname}} @SWITCH ) if $switch_name eq q{*}; 1743 1752 … … 1760 1769 my $research1 = $OID_NUMBER{searchPort1} . mac_address_hex_to_dec($mac_address); 1761 1770 my $research2 = $OID_NUMBER{searchPort2} . mac_address_hex_to_dec($mac_address); 1762 print "Klask search OID $research1 on switch $sw_name\n" ;1763 print "Klask search OID $research2 on switch $sw_name\n" ;1771 print "Klask search OID $research1 on switch $sw_name\n" if $verbose; 1772 print "Klask search OID $research2 on switch $sw_name\n" if $verbose; 1764 1773 1765 1774 my ($session, $error) = Net::SNMP->session( %session ); … … 1781 1790 } 1782 1791 else { 1783 print "Klask do not find MAC $mac_address on switch $sw_name\n" ;1792 print "Klask do not find MAC $mac_address on switch $sw_name\n" if $verbose; 1784 1793 } 1785 1794 … … 1794 1803 my $verbose; 1795 1804 1796 my $ret =GetOptions(1805 GetOptions( 1797 1806 'verbose|v' => \$verbose, 1798 1807 ); … … 1996 2005 my $format = 'txt'; 1997 2006 1998 my $ret =GetOptions(2007 GetOptions( 1999 2008 'format|f=s' => \$format, 2000 2009 );
Note: See TracChangeset
for help on using the changeset viewer.