[Nagiosplug-devel] [Patch] AIX check_disk fix

Ian Duggan ian.duggan at demandtec.com
Sat Mar 8 03:35:02 CET 2003


The version of check_disk distributed with nagios-plugins-1.3.0 fails on AIX 
because AIX outputs dashes instead of numbers where sscanf is trying to read 
%d. This causes parsing to fail. Since the /proc filesystem is meaningless 
for filesystem checks, this patch causes the /proc line to be skipped. It 
might be better to read the values in as strings and only skip if you see a 
-, but this fix should be sufficient for any system I can think of.

There previous error:

qa-db1% ./plugins/check_disk -w 20 -c 10
Unable to read output:
/usr/bin/df -Pk
/proc                   -         -         -       -  /proc

-- Ian

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ian Duggan    ian at ianduggan.net    http://www.ianduggan.net                    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_disk_procfs.aix.patch
Type: text/x-diff
Size: 1531 bytes
Desc: not available
URL: <http://nagios-plugins.org/archive/devel/attachments/20030308/4704c1dd/attachment.patch>


More information about the Devel mailing list