How to get total usage of disk space

How to get total usage of disk space

This is my df -k output:

bash-2.03# df -kl
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d1       6198606 4706544 1430076    77%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
/dev/md/dsk/d2       6198606 1295354 4841266    22%    /var
swap                 28122232      24 28122208     1%    /var/run
dmpfs                28122208       0 28122208     0%    /dev/vx/dmp
dmpfs                28122208       0 28122208     0%    /dev/vx/rdmp
swap                 28158368   36160 28122208     1%    /tmp
/dev/vx/dsk/datadg/pk1env
                       61440    2168   55573     4%    /pk1env
/dev/vx/dsk/datadg/RD
                     26288128  337377 24329013     2%    /RD
/dev/vx/dsk/datadg/saswork
                     104857600   29157 98277953     1%    /saswork
/dev/vx/dsk/data2dg/arenv_dev
                     52428800   96912 49062058     1%    /arenv_dev
/dev/vx/dsk/datadg/ora_vol
                     10485760 3238372 6794469    33%    /oracle
/dev/vx/dsk/datadg/arenv_uat
                     104857600 51733220 49809874    51%    /arenv_uat
/dev/vx/dsk/datadg/dmenv
                     316518719 218121659 92248055    71%    /dmenv
/dev/vx/dsk/datadg/inet
                     419430400 156786469 246229944    39%    /inet
/dev/vx/dsk/datadg/arenv
                     311907385 233406838 73606015    77%    /arenv
/dev/md/dsk/d4       1021735  439771  520660    46%    /opt/patrol
/dev/vx/dsk/datadg/usrlocal
                      122880   38592   80015    33%    /usr/local
/dev/vx/dsk/datadg/localapps
                     14680064 8824440 5490473    62%    /local/apps

This is the script:

bash-2.03#  df -kl | awk '/^\/dev\// { avail += $3/1024 } END { printf("%d Mb used\n",avail)} '
663141 Mb used
Source

0 comments: