[Nagiosplug-devel] Problem with check_sun_hardware plugin
Peter Michael Calum
pemca at tdc.dk
Mon Jun 23 10:54:28 CEST 2008
Hi
I'm using the sun_hardware plugin and it works fine on V240 / Solaris 9,
but i found a couple of problems i want to report, and hopefully gets
corrected :)
I'ts concerning the cpu check, where i found 2 errors
- On solaris 10 CPU state is returnes as "on-line" instead of online
(see my correction below)
- On V245 servers with solaris 10 the subroutine check_cpu is called 5
times, i dont know why
and i havent been able to correct it. Please mail me if you want
printouts from the server.
sub check_cpu {
my (%cpu) = %{(shift)};
my $res = $ERRORS{'OK'};
if (!(($cpu{'State'} eq 'online') || ($cpu{'State'} eq 'on-line'))) {
$res_str .= "CPU $cpu{'cpuid'}: $cpu{'State'}; ";^M
$res = $ERRORS{'CRITICAL'};^M
}
$res_str .= "CPU $cpu{'cpuid'}: OK; " if(($res == $ERRORS{'OK'}) &&
!defined($opt_errors_only));
return $res;
}
V245 test (solaris 10)
# ./check_sun_hardware -c cpu -d
SUNW,UltraSPARC-IIIi (cpu, 9700000108)
:_fru_parent (9700000890H)
:StateBegin Tue Feb 26 14:43:50 2008
:FPUType sparcv9
:ProcessorType sparcv9
:State on-line
:ID 0
:UnitAddress 0,0
:ecache-size 0x100000
:reg 00 00 04 00 00 00 00 00 00 00 00 00 00 01 00 00
:portid 0
:cpuid 0
:device_type cpu
:icache-size 0x8000
:icache-line-size 0x20
:icache-associativity 0x4
:#itlb-entries 0x10
:dcache-size 0x10000
:dcache-line-size 0x20
:dcache-associativity 0x4
:#dtlb-entries 0x10
:sparc-version 0x9
:ecache-line-size 0x40
:ecache-associativity 0x4
:mask# 0x34
:implementation# 0x16
:manufacturer# 0x3e
:clock-frequency 0x59a53800
:clock-divisors 00 00 00 01 00 00 00 02 00 00 00 20
:pm-components (9700000111TBL)
| NAME=CPU Speed |
| 1=1/32 of Normal |
| 2=1/2 of Normal |
| 3=Normal |
:devfs-path /SUNW,UltraSPARC-IIIi at 0,0
:driver-name us
:binding-name SUNW,UltraSPARC-IIIi
:bus-addr 0,0
:instance 0
:_class cpu
:name SUNW,UltraSPARC-IIIi
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in string eq at ./check_sun_hardware line
156, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Use of uninitialized value in concatenation (.) or string at
./check_sun_hardware line 157, <F> line 41.
Result string:
CPU 0: OK; CPU : ; CPU : ; CPU : ; CPU : ;
Performance data:
CRITICAL: CPU 0: OK; CPU : ; CPU : ; CPU : ; CPU : ;
#
Thanks,
Kind regards
Peter Calum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20080623/4b393a45/attachment.html>
More information about the Devel
mailing list