Hi Justin, thanks for your bugreport.
On Tuesday, 6. July 2010, Justin T Pryzby wrote: > It seems this fails but is intended to work (see the -h help output): > |$ DF -H /home; echo; /usr/lib/nagios/plugins/check_disk -w 15GB -c 2GB -p > |/home -vvv Filesystem Size Used Avail Use% Mounted on > |/dev/mapper/jp-home 40G 30G 8.4G 78% /home > | > |calling stat on /home > |For /home, total=10321232, available=2184891, available_to_root=2709067, > |used=7612165, fsp.fsu_files=5242880, fsp.fsu_ffree=5221430 For /home, > |used_pct=78 free_pct=22 used_units=29735 free_units=8534 > |total_units=40317 used_inodes_pct=1 free_inodes_pct=99 > |fsp.fsu_blocksize=4096 mult=1048576 Freespace_units result=0 > |Freespace% result=0 > |Usedspace_units result=0 > |Usedspace_percent result=0 > |Usedinodes_percent result=0 > |Freeinodes_percent result=0 > |DISK OK - free space: /home 8534 MB (22% inode=99%);| > |/home=29735MB;40302;40315;0;40317 > > Note that in the perf data output: > 40302 = 40317 - 15 > MB = MB - GB > > It would seem that the units on the thresholds are ignored. It works > with -u, but that loses the ability to specify different partitions or > > thresholds with different units: > |$ df -h /home; echo; /usr/lib/nagios/plugins/check_disk -w 15 -c 2 -p > |/home -vvv -u GB Filesystem Size Used Avail Use% Mounted on > |/dev/mapper/jp-home 40G 30G 8.4G 78% /home > | > |calling stat on /home > |For /home, total=10321232, available=2184891, available_to_root=2709067, > |used=7612165, fsp.fsu_files=5242880, fsp.fsu_ffree=5221430 For /home, > |used_pct=78 free_pct=22 used_units=29 free_units=8 total_units=39 > |used_inodes_pct=1 free_inodes_pct=99 fsp.fsu_blocksize=4096 > |mult=1073741824 Freespace_units result=1 > |Freespace% result=0 > |Usedspace_units result=0 > |Usedspace_percent result=0 > |Usedinodes_percent result=0 > |Freeinodes_percent result=0 > |DISK WARNING - free space: /home 8 GB (22% inode=99%);| > |/home=29GB;24;37;0;39 A short consultation with upstream resulted in the conclusion, that the help is just wrong. Upstream provided a patch which fixed it and I just applied that. Anyways ... upstream told me, that it would be a nice idea to have this feature. Feel free to open a feature request at http://sourceforge.net/tracker/?group_id=29880&atid=397600, patches are also welcome. Thanks and with kind regards, Jan. -- Never write mail to <w...@spamfalle.info>, you have been warned! -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++ ------END GEEK CODE BLOCK------
signature.asc
Description: This is a digitally signed message part.