-
Notifications
You must be signed in to change notification settings - Fork 284
Closed
Labels
Description
Hello,
It seems to me that the option --freespace-ignore-reserved should be the default.
It would be consistent with the computation of the percentage :
p->dused_pct = calculate_percent( p->used, p->used + p->available ); /* used + available can never be > uintmax */
p->dfree_pct = 100 - p->dused_pct;
In the current situation, we can have a WARNING (or CRITICAL) alert, while the displayed values in the perfdata show that usage is less than threshold. For instance :
user@host:~$ /usr/local/libexec/check_disk -w 82% -c 10% -m -p /luks_headers_backup/ --freespace-ignore-reserved
DISK WARNING - free space: /luks_headers_backup 142MiB (81% inode=99%);| /luks_headers_backup=33554432B;32841400;164207001;0;182452224
user@host:~$ /usr/local/libexec/check_disk -w 82% -c 10% -m -p /luks_headers_backup/
DISK WARNING - free space: /luks_headers_backup 142MiB (81% inode=99%);| /luks_headers_backup=33554432B;35483811;177419059;0;197132288
root@host:~# tune2fs -l /dev/sda4 | grep -i 'reserved block count\|block size'
Reserved block count: 10240
Block size: 1024