align data -> indompting

git-svn-id: http://svn.centreon.com/Plugins/Dev@2445 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
Julien Mathis 2007-06-05 20:02:18 +00:00
parent d5b5f311e1
commit 6a3a025382
1 changed files with 43 additions and 51 deletions

View File

@ -81,9 +81,7 @@ print_usage();
exit $ERRORS{'OK'};
}
my $snmp = "1";
if ($opt_v && $opt_v =~ /^[0-9]$/) {
$snmp = $opt_v;
}
$snmp = $opt_v if ($opt_v && $opt_v =~ /^[0-9]$/);
if ($snmp eq "3") {
if (!$opt_u) {
@ -99,9 +97,7 @@ exit $ERRORS{'OK'};
}
}
if (!$opt_C) {
$opt_C = "public";
}
$opt_C = "public" if (!$opt_C);
my $process;
if(!$opt_p) {
@ -154,16 +150,13 @@ foreach my $key (oid_lex_sort(keys %$result)) {
my @oid_list = split (/\./,$key);
$process_list{$$result{$key}} = pop (@oid_list) ;
if (defined($opt_p) && $opt_p ne ""){
if ($$result{$key} eq $opt_p){
$proc++;
}
$proc++ if ($$result{$key} eq $opt_p);
} else {
$proc++;
}
}
if (!($opt_n))
{
if (!($opt_n)) {
if ($process_list{$process}) {
$result = $session->get_request(-varbindlist => [$OID_SW_RunStatus . "." . $process_list{$process}]);
if (!defined($result)) {
@ -212,4 +205,3 @@ sub print_help () {
print_usage();
print "\n";
}