<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Alexander,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Can you please try the CVS snapshot: <A href="http://nagiosplug.sourceforge.net/snapshot">http://nagiosplug.sourceforge.net/snapshot</A> for the latest check_disk. I've made changes so that is more closely mimics df from the coreutils project. I'd be interested to hear how well this works on AIX.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>When you have compile check_disk, please run: cd plugins && perl t/check_disk.t. This runs some tests to see if check_disk is working as expected. The return code should be 0 (there are a couple of TODOs that will show as fail, but are expected).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ton</DIV><DIV><BR><DIV><DIV>On 17 Jul 2006, at 07:05, Alexander Harvey wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Actually, it still doesn't really work in AIX5L as it always finds the /proc filesystem to be of size -1%.<BR><BR>I've rewritten this plugin as a shell script for anyone else who might find this useful:<BR><BR>#!/bin/ksh<BR> # author: alex harvey<BR># email: <A href="mailto:alexh19740110@gmail.com">alexh19740110@gmail.com</A><BR><BR>Usage ()<BR>{<BR>    printf "Usage: %s: [-w warn] [-c crit]\n" $0<BR>    exit 3<BR>}<BR><BR>wflag=<BR> cflag=<BR><BR>while getopts w:c: opt<BR>do<BR>   case $opt in<BR>      w) wflag=1<BR>         warn=$OPTARG<BR>         ;;<BR>      c) cflag=1<BR>         crit=$OPTARG<BR>         ;;<BR>      ?) Usage<BR>         ;;<BR>   esac <BR>done<BR><BR># too many arguments?<BR>shift $(($OPTIND -1))<BR>[ $# -ne 0 ] && Usage<BR><BR># missing warn or crit option?<BR>[ ! -z "$wflag" ] && [ ! -z "$cflag" ] || Usage<BR><BR># chop the trailing % <BR>warn=`echo $warn | sed -e 's/%$//'`<BR>crit=`echo $crit | sed -e 's/%$//'`<BR><BR>mounts=`\<BR>  df -k |\<BR>  grep -v /proc |\<BR>  grep -v /var/adm/ras/platform |\<BR>  tail +2 |\<BR>  awk '{print $7}'`<BR><BR>STATE=0 <BR><BR>for i in $mounts; do<BR>   free_pcent=`df -k |\<BR>     awk -v input=$i '{if ($7 == input) print $4}' |\<BR>     sed -e 's/%//'`<BR>   free_pcent=`echo 100 - $free_pcent | bc`<BR>   free_kb=`df -k |\<BR>     awk -v input=$i '{if ($7 == input) print $3}'` <BR>   if [ $free_pcent -le $warn ] && [ $STATE -le 1 ]; then<BR>      STATE=1<BR>      mess="$mess, $free_kb kB (${free_pcent}%) free on $i"<BR>   fi<BR>   if [ $free_pcent -le $crit ]; then<BR>      STATE=2 <BR>      mess="$mess, $free_kb kB (${free_pcent}%) free on $i"<BR>   fi<BR>done<BR><BR>case $STATE in<BR>   0) echo "DISK OK"<BR>      exit 0<BR>      ;;<BR>   1) STATE_MESS=WARNING<BR>      ;;<BR>   2) STATE_MESS=CRITICAL <BR>      ;;<BR>esac<BR><BR>mess=`echo $mess | sed -e 's/^, //'`<BR>mess="DISK $STATE_MESS [$mess]"<BR>echo $mess<BR>exit $STATE<BR><BR><BR>Kind Regards,<BR>Alex<BR><BR><BR><DIV><DEFANGHTML_SPAN class="gmail_quote">On 7/10/06, <B class="gmail_sendername">Alexander Harvey</B> <<A href="mailto:alexh19740110@gmail.com">alexh19740110@gmail.com</A>> wrote:</DEFANGHTML_SPAN><BLOCKQUOTE class="gmail_quote" defanghtml_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <DIV>Well, I got this to work using the earlier version:</DIV><DIV><DEFANGHTML_SPAN class="q"><BR><BR># ./plugins/<DEFANGHTML_SPAN id="st" name="st" class="st">check_disk</DEFANGHTML_SPAN> -w 10% -c 5% -p /home<BR></DEFANGHTML_SPAN></DIV><DIV>DISK OK - free space: /home 508 MB (99%);| /home=5MB;460;486;0;512 <BR><BR># ./plugins/<DEFANGHTML_SPAN id="st" name="st" class="st">check_disk</DEFANGHTML_SPAN> --version<BR><DEFANGHTML_SPAN id="st" name="st" class="st">check_disk</DEFANGHTML_SPAN> (nagios-plugins 1.4.2) 1.57<BR><BR>Perhaps this is a bug?<BR><BR>Regards,<BR>Alex</DIV><DIV><DEFANGHTML_SPAN class="e" id="q_10c57ffe69277935_3"><BR><BR><DIV><DEFANGHTML_SPAN class="gmail_quote">On 7/10/06, <B class="gmail_sendername">Alexander Harvey</B> < <A href="mailto:alexh19740110@gmail.com" title="mailto:alexh19740110@gmail.com" target="_blank" defanghtml_onclick="return top.js.OpenExtLink(window,event,this)">alexh19740110@gmail.com </A>> wrote:</DEFANGHTML_SPAN><BLOCKQUOTE class="gmail_quote" defanghtml_style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><DIV>Hi,<BR><BR>Has anyone else had any problems using the latest check_disk v1.64 plugin in AIX5.3?<BR><BR>Here's my list of filesystems:<BR><BR># df -k<BR>Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on<BR> /dev/hd4         10747904   1515560   86%     1975     1% /<BR>/dev/hd2          2883584   1653188   43%    28814     8% /usr<BR>/dev/hd9var       2097152   1454828   31%     2898     1% /var<BR>/dev/hd3          2097152   1770060   16%     1453     1% /tmp <BR>/dev/fwdump        262144    261776    1%        4     1% /var/adm/ras/platform<BR>/dev/hd1           524288    519920    1%      118     1% /home<BR>/proc                   -         -    -         -     -  /proc<BR> /dev/hd10opt       262144    125340   53%     3127    10% /opt<BR>/dev/fslv00     167772160  23425268   87%       48     1% /u02<BR>/dev/fslv01     139460608  69102616   51%      131     1% /u03<BR>/dev/u01lv       16515072   9477800   43%    22322     2% /u01 <BR><BR>1. First example of false or misleading output:<BR><BR># ./plugins/check_disk -w 10% -c 5%<BR>DISK CRITICAL - free space: / 1480 MB (14% inode=99%); /usr 1614 MB (57% inode=93%); /var 1421 MB (69% inode=99%); /tmp 1729 MB (84% inode=100%); /var/adm/ras/platform 256 MB (100% inode=100%); /home 508 MB (99% inode=100%); /proc 0 MB (0% inode=NaNQ%); /opt 122 MB (48% inode=90%); /u02 22876 MB (14% inode=100%); /u03 67483 MB (50% inode=100%); /u01 9256 MB (57% inode=99%);| /=9016MB;9446;9971;99;10496 /usr=1202MB;2534;2675;92;2816 /var=628MB;1843;1945;99;2048 /tmp=320MB;1843;1945;99;2048 /var/adm/ras/platform=1MB;230;243;99;256 /home=5MB;460;486;99;512 /proc=-1MB;1717986917;858993458;-2147483648;-1 /opt=134MB;230;243;90;256 /u02=140964MB;147456;155648;99;163840 /u03=68709MB;122572;129382;99;136192 /u01=6873MB;14515;15321;98;16128 <BR><BR>(Looks like it's failing to understand the /proc entry?)<BR><BR>2. Second example of failed output:<BR><BR># ./plugins/check_disk -w 10% -c 5% -p /home<BR>INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP ( 0.0) and both should be between zero and 100 percent, inclusive for /home<BR>check_disk: Could not parse arguments<BR>Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout][-m] [-e] [-W limit] [-K limit] [-v] [-q] <BR><BR>3. Furthermore I noticed it failed the test in 'make test':<BR><BR>./t/check_disk......dubious<BR>        Test returned status 255 (wstat 65280, 0xff00)<BR>DIED. FAILED tests 1, 3-32<BR>        Failed 31/32 tests, 3.12% okay<BR><BR>Anyone seen any of this before?<BR><BR>My configure options were:<BR><BR># ./configure --with-openssl=no --with-ipv6=no<BR><BR>Thanks in advance,<BR><BR>Alex Harvey<BR><BR> </DIV></BLOCKQUOTE></DIV><BR> </DEFANGHTML_SPAN></DIV></BLOCKQUOTE></DIV><BR> <BR><BR><P align="center">This message has been scanned for viruses by <A href="http://www.MailController.altohiway.com/">MailController</A>.</P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-------------------------------------------------------------------------</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Using Tomcat but need to do more? Need to support web services, security?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Get stuff done quickly with pre-integrated technology to make your job easier</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Nagios-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">::: Messages without supporting info will risk being sent to /dev/null</DIV> </BLOCKQUOTE></DIV><BR></DIV><BR><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://www.altinity.com">http://www.altinity.com</A></DIV><DIV>T: +44 (0)870 787 9243</DIV><DIV>F: +44 (0)845 280 1725</DIV><DIV>Skype: tonvoon</DIV></SPAN></SPAN></SPAN></SPAN></SPAN><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>