Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk Capacity and Useage 1

Status
Not open for further replies.

kovacsa

MIS
Apr 3, 2003
100
0
0
CA
Hello ...

Does anyone know what command(s) to use to find out the physical disk capacity and what portion of it is being used on a machine running AIX 4.3.1?

Thanks in advance,

kovacsa
 
Check this FAQ: faq52-2441

It gives you a report of disks on the system, how many physical partitions are used and free, and what is on the disks. You can read the script to see the commands to use if you don't want to use the script.
 
Here is a little script that may help

#!/bin/ksh
#set -x
#
# display.free.dasd - script to display free dasd space on system/node/whatever
#
#
#
print "DISK PP Total Used Avail Volume Group"
#for i in `lspv | awk '{ print $1 }'`
disks=`getlvodm -C | awk '{ print $1 }'| sort -k 1.6,1n `
case "$1"
in
y)
for i in $disks
do
`lspv $i 1>/dev/null 2>eouchk`
if [[ `ls -ail eouchk | awk '{ print $6 }'` -eq 0 ]]
then
PPSIZE=`lspv $i | grep "PP SIZE" | cut -c 20-23`
WTMEG=`lspv $i | grep "TOTAL PPs" | awk '{print $4}'`
TMEG=${WTMEG#"("}
WUMEG=`lspv $i | grep "USED PPs" | awk '{print $4}'`
UMEG=${WUMEG#"("}
WFMEG=`lspv $i | grep "FREE PPs" | awk '{print $4}'`
FMEG=${WFMEG#"("}
VGRP=`lspv $i | grep "VOLUME GROUP" | awk '{print $6}'`
echo "$i => $PPSIZE $TMEG megs - $UMEG megs => $FMEG megs $VGRP"
else
paste -d' ' -s eouchk | sed s/000[0-9,aA-zZ]*/$i/g | sed s/' '//g
echo < eouchk
fi
done
;;
#echo &quot;SECOND TIME AROUND ====>>>>&quot;
*)
for i in $disks
do
`lspv $i 1>/dev/null 2>eouchk`
if [[ `ls -ail eouchk | awk '{ print $6 }'` -eq 0 ]]
then
PPSIZE=`lspv $i | grep &quot;PP SIZE&quot; | cut -c 20-23`
WTMEG=`lspv $i | grep &quot;TOTAL PPs&quot; | awk '{print $4}'`
TMEG=${WTMEG#&quot;(&quot;}
WUMEG=`lspv $i | grep &quot;USED PPs&quot; | awk '{print $4}'`
UMEG=${WUMEG#&quot;(&quot;}
WFMEG=`lspv $i | grep &quot;FREE PPs&quot; | awk '{print $4}'`
FMEG=${WFMEG#&quot;(&quot;}
VGRP=`lspv $i | grep &quot;VOLUME GROUP&quot; | awk '{print $6}'`
echo &quot;$i => $PPSIZE $TMEG megs - $UMEG megs => $FMEG megs $VGRP&quot;
else
novg=`paste -d' ' -s eouchk | sed s/000[0-9,aA-zZ]*/$i/g | sed s/' '//g`
echo $novg
fi
done
;;
esac
rm -f eouchk

Sample output

DISK PP Total Used Avail Volume Group
hdisk0 => 16 8672 megs - 3472 megs => 5200 megs rootvg
hdisk1 => 16 8672 megs - 3472 megs => 5200 megs rootvg
hdisk2 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk3 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk4 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk5 => 32 4288 megs - 3456 megs => 832 megs billingvg
hdisk6 => 32 4288 megs - 3456 megs => 832 megs billingvg
hdisk7 => 8 m 4296 megs - 3008 megs => 1288 megs sortvg
hdisk8 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk9 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk10 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk11 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk12 => 512 4096 megs - 4096 megs => 0 megs oraclevg
hdisk13 => 512 8192 megs - 5120 megs => 3072 megs oraclevg
hdisk14 => 16 12896 megs - 2720 megs => 10176 megs db2v2vg
hdisk15 => 128 34688 megs - 11008 megs => 23680 megs vertexvg
hdisk16 => 512 34304 megs - 22016 megs => 12288 megs oraclevg
hdisk18 => 256 34560 megs - 25088 megs => 9472 megs AETHER
hdisk19 => 64 34752 megs - 24640 megs => 10112 megs umsvg
hdisk21 => 64 34752 megs - 24640 megs => 10112 megs umsvg
hdisk22 => 512 103936 megs - 84992 megs => 18944 megs oraclevg
0516-320 : Physical volume hdisk24 is not assigned to a volume group.
hdisk26 => 16 12896 megs - 7840 megs => 5056 megs db2v2vg
0516-320 : Physical volume hdisk27 is not assigned to a volume group.
hdisk28 => 512 69120 megs - 56320 megs => 12800 megs oraclevg

 
Hi kova

Simply u can have the solution like this

step 1:The physical capacity of the disk can be found by
#bootinfo -s <hdisk#>

u will get pv capacity in mb

step 2 :#lspv hdisk#

It shows its utilization...in terms of pps and bytes

sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top