Friday, April 11, 2008

VERITAS Calculate free disk space on each disk

root$ sh a.sh
... Free chunk on rootmirr(c0t1d0s2) 25226.6 MB
... Free chunk on rtdisk(c0t0d0s2) 5122.05 MB
... Free chunk on rtdisk(c0t0d0s2) 0.250977 MB
... Free chunk on rtdisk(c0t0d0s2) 0.255859 MB
... Free chunk on rtdisk(c0t0d0s2) 2049.67 MB
... Free chunk on rtdisk(c0t0d0s2) 550.151 MB
root$ more a.sh
#! /bin/sh
vxdg -g rootdg free | nawk '
{
if ($5/2/1024 > 0)
print "... Free chunk on "$1"("$2")"" " $5/2/1024, "MB"
}'
root@ebitb2b2 $