:
Show amount of disk space free or used.
Module data
module_begin module_name dsk_home_free module_type generic_data module_exec df -kh /home | tail -1 | awk '{NF--; print 100-$NF }' module_max 100 module_min 0 module_description Free disk (%) of home partition module_end
module_begin module_name dsk_root_free module_type generic_data module_exec df -kh / | tail -1 | awk '{NF--; print 100-$NF }' module_max 100 module_min 0 module_description Free disk (%) of root partition module_end
If you want the % of disk usage, remove the 100 and add a tr -d to remove the % sign:
ex:
module_exec df -kh / | tail -1 | awk '{NF--; print $NF }' | tr -d "%"
(Visited 972 times, 1 visits today)