Disk space for root partition

Hello,
I am trying to monitor disk space for each node on the machine. I am able to get all individual nodes but for the '/' node. For example:
df -k:
bash-2.05b# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xxx 4127108 2415340 1502120 62% /
/dev/yyy 77750 20614 53122 28% /boot
/dev/zzz 410898760 73467776 316558536 19% /opt
/dev/aaa 4127108 619428 3298032 16% /var

if I say df -k | grep /opt: I can get disk space for /opt. As I get all the nodes if I grep for just '/', can you please let me know how I can get disk space for /

Thanks
Chiru

Hi chiru_h

You can try running command:

df -k /

I hope it helps

Erwin

Thanks Erwin, that indeed is giving only the root disk space. But actually I am using it in a script for monitoring:
df -k | egrep '/opt|/var|/' | awk '{print $6"\t"$5}' | while read LINE; do DISK=`echo $LINE | cut -d"%" -f1 |awk '{ print $2 }'`; if [ $DISK -gt 80 ]; then echo "${LINE}"; fi; done

How can I incorporate it in the script?

You can use the '$' symbol to indicate the end of the line.

In your script, the first line should look like this:

df -k | egrep '/opt|/var|/$' | awk '{print $6"\t"$5}'| while read LINE

Regards,

Erwin