Your clue is in this line:

> DISK CRITICAL - free space: /data02b 0 MB (0% inode=99%);| 
> /data02b=2147483647MB;10874142;11096064;0;11096064

That "2147483647" number should look suspicious to you (being exactly 2^^31 − 
1).  It's your evidence that check_disk encountered some sort of 
integer-overflow condition when sensing the disk space.  Quite possibly, the 
underlying disk driver returned such a number when asked about the amount of 
space in the partition.  Given that the two partitions in question both had 
27873280 MB overall capacity (i.e., 28542238720 KB), and none of the other 
partitions approach anywhere near this size, I'd say that check_disk has 
trouble dealing with such a large partition.  64-bit arithmetic will be 
required throughout to handle this case.

The only way to debug this for sure is to dig into the check_disk code and 
instrument it to print out what it gets back from the OS when asking for the 
disk information, and then trace the arithmetic operations in check_disk 
itself.  And, look for evidence of 32-bit arithmetic within both results 
requested for disk sizing from the OS and for subsequent calculations within 
check_disk.

On Tue, 3/31/15, Phan, Thao-Chi X <thao-chi.p...@allina.com> wrote:
> Please explain to me why the /usr/local/groundwork/nagios/libexec/check_disk
> doesn't report the correct disk space free on 2 mount points /data02b and 
> /data02a on a server.
>
> root@abc2/usr/local/groundwork/nagios/libexec# df -m      
> Filesystem    MB blocks      Free %Used    Iused %Iused Mounted on
> /dev/hd4         512.00    336.67   35%     5761     3% /
> /dev/hd2        5120.00   2051.53   60%    44310     4% /usr
> /dev/hd9var      512.00    228.29   56%    26189    20% /var
> /dev/hd3        3072.00   2973.20    4%      101     1% /tmp
> /dev/hd1        7168.00   4794.46   34%     1854     1% /home
> /proc                 -         -    -         -     -  /proc
> /dev/hd10opt    1024.00    320.47   69%     9826     4% /opt
> /dev/locallv    2048.00   1136.73   45%      720     1% /usr/local
> /dev/hd11admin    128.00    123.93    4%       20     1% /admin
> /dev/oralv    143360.00 100961.11   30%   203739     1% /oracle
> /dev/data01lv 276224.00 124619.55   55%       86     1% /data01
> /dev/eplv        256.00    253.61    1%        6     1% /epic
> /dev/clarlv   303104.00  89595.34   71%    67974     1% /epic/clarity
> /dev/ftplv       512.00    507.60    1%        4     1% /ftpdir
> /dev/dbkuplv   97792.00  67809.48   31%     3748     1% /dbkup
> /dev/data03lv 215040.00  32499.46   85%       89     1% /data03
> /dev/ctmaglv    5120.00   4587.26   11%     3301     1% /ctmag
> /dev/dump_cp    5120.00   5098.90    1%        4     1% /var/adm/ras/dump_cp
> /dev/lv00     27873280.00 11204341.16   60%      880     1% /data02b
> /dev/lv02       5120.00   5027.61    2%       12     1% /data04b
> /dev/lv01      46080.00  16327.36   65%       14     1% /oraredob
> /dev/lv04a    27873280.00 2550106.27   91%      880     1% /data02a
> /dev/lv06a      5120.00   5027.61    2%       12     1% /data04a
> /dev/lv05a     46080.00  16327.36   65%       14     1% /oraredoa
>
> -------INCORRECT --- 0 MB is not correct. 0% free is not correct.
> root@abc2 /usr/local/groundwork/nagios/libexec# ./check_disk -w 2% -c 0% -p 
> /data02b
> DISK CRITICAL - free space: /data02b 0 MB (0% inode=99%);| 
> /data02b=2147483647MB;10874142;11096064;0;11096064
>
> -------INCORRECT ---- 22% free is not correct
> root@abc2 /usr/local/groundwork/nagios/libexec# ./check_disk -w 2% -c 0% -p 
> /data02a
> DISK OK - free space: /data02a 2550106 MB (22% inode=99%);| 
> /data02a=8545957MB;10874142;11096064;0;11096064
>
> -------CORRECT
> root@abc2 /usr/local/groundwork/nagios/libexec# ./check_disk -w 2% -c 0% -p 
> /data04a
> DISK OK - free space: /data04a 5027 MB (98% inode=99%);| 
> /data04a=92MB;5017;5120;0;5120
>
> -------CORRECT
> root@abc2 /usr/local/groundwork/nagios/libexec# ./check_disk -w 2% -c 0% -p 
> /oracle
> DISK OK - free space: /oracle 100961 MB (70% inode=99%);| 
> /oracle=42398MB;140492;143360;0;143360
>
> Thanks a lot.
>
> Thao-Chi

Reply via email to