Linux – Checking Linux Disk space

centoslinux

I want to check the disk free space in mu RHEL/Centos box. If I use df, sometimes, the command just hangs. (because of NFS issue or something)

I want to create a monitoring script and want to monitor disk free space usage. I do not want to use df, as it could hang.

I thought about "tune2fs -l" but the values does not match the output from "df"

How do i get the free disk space without using df?

Thanks in Advance
Vijay

Best Answer

If you have issues with remote FS you can try -l from df to show only local FS (without smb, nfs,...) ex.

df -hl