Hello Paul,
Monit use the data from "statvfs" (on Linux, use "man statvfs" to get
detail information) only.

Keep in mind, with "every 5 cycles" Monit show the data from 5 cycles
ago. The time when the data was collected is reported in "data collected".

For example
  space total                  391.0 GB (of which 0.0% is reserved for
root user)
  space free for non superuser 7.1 GB [1.8%]
  space free total             7.1 GB [1.8%]
  data collected               Sat, 14 Jun 2025 08:32:01

A suggestion only,
Lutz

p.s.
See https://man7.org/linux/man-pages/man3/statvfs.3.html


Am 13.06.25 um 22:23 schrieb Paul Theodoropoulos via This is the general
mailing list for monit:
> This is a minor issue, but I'm curious about it.
> 
> I have a couple of disk space usage tests on /home (debian linux, ext4).
> 
> 'df -h' reports:
> /dev/nvme1n1p1  5.9G  3.7G  2.2G 64% /home
> 
> I get the same percentage output regardless of '-h' (powers of 1024) or
> '-H' (powers of 1000). The gigabyte values differ, the percentage
> remains the same.
> 
> Tune2fs reports no reserved blocks on the partition:
> tune2fs -l /dev/nvme1n1p1 | grep 'Reserved'
> Reserved block count:     0
> Reserved GDT blocks:      511
> Reserved blocks uid:      0 (user root)
> Reserved blocks gid:      0 (group root)
> 
> But Monit's status output reports:
> space total                  5.8 GB (of which 0.3% is reserved for root
> user)"
> 
> my disk space argument is:
> 
> # HOME
> check filesystem homefs with path /home
> every 5 cycles
> if space greater 63 %
> then exec /usr/local/bin/pushover
> repeat every 5 cycles
> 
> The problem is, I will begin getting alerts before it reached 64% - as
> reported by df - example:
> 
> host [xxxxx] homefs - space usage 63.0% matches
> resource limit [space usage > 63.0%
> 
> As I said, minor - very minor - issue, though it is curious that Monit
> thinks there are reserved blocks on a partition with none. It'd just be
> great if there were a way to conform the output to match df's output.
> 


  • Disk sp... Paul Theodoropoulos via This is the general mailing list for monit
    • Re... Lutz Mader

Reply via email to