117a118,119 > my $o_multiply=undef; > my $multiplier=1.0; 124c126 < print "Usage: $0 [-v] -H -C [-2] | (-l login -x passwd [-X pass -L ,]) [-p ] -w -c -T=[stand|netsl|netsc|as400|cisco|cata|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t ] [-V]\n"; --- > print "Usage: $0 [-v] -H -C [-2] | (-l login -x passwd [-X pass -L ,]) [-p ] -w -c -T=[stand|netsl|netsc|as400|cisco|cata|nsc|fg|bc|nokia|hp|lp|hpux] [-m] [-f] [-t ] [-V]\n"; 150a153,155 > -m, --multiply > Multiply the load average thresholds by the number of logical CPUs > Only works with the netsl check type and multiple thesholds 201a207 > 'm' => \$o_multiply, 'multiply' => \$o_multiply, 238a245 > 266a274,280 > > # check that netsl is enabled when using --multiply > if ($o_multiply && $o_check_type ne "netsl") { > print "Check type must be netsl to use the multiply option !\n"; > print_usage(); > exit $ERRORS{"UNKNOWN"}; > } 346a361,387 > if ($o_multiply) { > verb("Counting the processors"); > # get processor ids so we can count them > my $cpuid = (Net::SNMP->VERSION < 4) ? > $session->get_table($proc_id) > : $session->get_table(Baseoid => $proc_id); > > if (!defined($cpuid)) { > printf("ERROR: Description table : %s.\n", $session->error); > $session->close; > exit $ERRORS{"UNKNOWN"}; > } > $multiplier = 0; > foreach my $key ( keys %$cpuid) { > verb("OID : $key, Desc : $$cpuid{$key}"); > $multiplier++; > } > verb("$multiplier logical CPUs"); > } else { > $multiplier = 1.0; > } > for (my $i=0;$i<3;$i++) { > $o_warnL[$i] *= $multiplier; > $o_critL[$i] *= $multiplier; > } > verb(sprintf("warn: %2.1f,%2.1f,%2.1f; crit: %2.1f,%2.1f,%2.1f",@o_warnL,@o_critL)); >