mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-23 05:35:01 +02:00
fix bug #334
git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@7677 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
5e3ff122f0
commit
eaaf238be7
@ -181,16 +181,16 @@ $cpu /= $i;
|
|||||||
|
|
||||||
# Plugin return code
|
# Plugin return code
|
||||||
my $status = "OK";
|
my $status = "OK";
|
||||||
if ($opt_w <= $cpu) {
|
if ($cpu >= $opt_c) {
|
||||||
$status = "WARNING";
|
|
||||||
} elsif ($opt_c <= $cpu) {
|
|
||||||
$status = "CRITICAL";
|
$status = "CRITICAL";
|
||||||
|
} elsif ($cpu >= $opt_w) {
|
||||||
|
$status = "WARNING";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $str = "CPU utilization percentage : ".$cpu."%|avg=".$cpu."%";
|
my $str = "CPU utilization percentage : ".$cpu."%|avg=".$cpu."%";
|
||||||
if ($opt_l == 0) {
|
if ($opt_l == 0) {
|
||||||
for ($i = 0; defined($cpulist[$i]); $i++){
|
for ($i = 0; defined($cpulist[$i]); $i++){
|
||||||
$str .= " cpu$i=".$cpulist[$i]."%";
|
$str .= " cpu$i=".$cpulist[$i]."%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print $str."\n";
|
print $str."\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user