A textfile collector for node-exporter. It outputs the summarized sizes of subdirectories under a given folder (default: /home
) in Prometheus exporter metrics format.
It provides optional cache mechanism based on modification date of files. It can be used by a metric monitor to quickly estimate the used space without scanning the whole disk every time. You can tune the analyzing depth and threshold of durations to make it more accurate.
$ home-sizes-prom
$ home-sizes-prom /data
$ home-sizes-prom /home -c /var/lib/home-sizes/home.msgpack
# Set depth=3 and regard those folders modified 1 months ago in cache as reliable sizes
$ home-sizes-prom /home -c /var/lib/home-sizes/home.msgpack -d 3 -t 30
Fast, cross-platform disk usage CLI
This fork fixed duplicate size counts of hardlinks by file id deduplication (Linux inodes, Windows dwVolumeSerialNumber, nFileIndexHigh, nFileIndexLow).
$ ds
$ ds PATH
$ ds -d 3
$ ds -a PATH
$ ds -m 0.2 PATH