![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help: root partition crashed, fsck failed. Disk problem? | steeles | SUN Solaris | 2 | 02-11-2008 07:09 PM |
| Reinstall root partition | jbestor | SUN Solaris | 4 | 04-25-2007 05:18 PM |
| Ran out of space on /dev/root partition | Martyn | Filesystems, Disks and Memory | 2 | 07-07-2006 09:58 AM |
| moving space from one partition to another | jason6792 | UNIX for Advanced & Expert Users | 4 | 10-08-2001 06:54 PM |
| Swap Partition Space | I[X]ION | UNIX for Dummies Questions & Answers | 1 | 08-24-2001 10:00 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
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? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|