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!

Total Disk Space?? 2

Status
Not open for further replies.

jkc924

MIS
Aug 5, 2002
35
0
0
US
Hello,
I have 14 RS/6000 servers all with SSA or SCSI attached external disk.
I have been asked to figure out total disk space per server and amount of disk in use.
Is there a quick way to figure this out (They want the results in Gigabyte).
Thanks,
jkc924
 
jkc924,

here's the basic:

1. lspv
- will tell you how many hardisk/s you have on your system

2. lspv hdisk# (where # = the disk number)


3. lsvg
- show you how many VG's you have on your system

4. lsvg <VG>
- will show you volume group's details; the size,used & free PP in MB, noting that volume group may contain several hard disk/s.


***NOTE****
1,000 MB = 1GB

This is just to start working.
 
or you can try this:

lscfg -vl hdisk#

- where # is the disk number, say;

lscfg -vl hdisk0

check first how many disk/s you have on you system by:

lspv
 
I have a script that I got from The AIX Survival Guide by Andreas Siegert -- the best book for AIX, except it is getting really dated. Some of the stuff is still relevant.

This script goes out and lists each disk, telling you how much space is left on each disk. This is sort of a summary. Then it lists each mount point and how much disk space each mount point is taking and on what disk.

If you post your email, I will send it to you. It will make your life a whole lot easier. (I'll also send you my other script that gathers other info about the system. I use it as part of my &quot;disaster recovery&quot; routine.)

 
Hi,
when you have choosen the right command to retrieve
total-used-free space, I suggest to enable your client
to romote shell from (root@yourmachine) (.rhost)

Then, on the server, (or in a your machine) build
a script that loops in a list of your clients, then
executes the 1st script (lsvg...) . You can put this
script on the server, mounted by NFS, so that you can
modify it without download each time on client.

Clicking a button, after some minutes you can know:

1) if the client is on
2) total space
3) any other thing that you can want know
4) you can print them, and why not, see it on a web page
5) it is not Tivoli, but it's yours .

bye.
 
Post your emails and I'll send you the script.
 
Hi bi,

please send a copy of your scripts to k_guenter@hotmail.com

Thanks...
 
Hi bi,

Could you please send a copy of the script to me to at
mailsaman@yahoo.com

Thank you,
 
Hi bi,

Could you please send a copy of the script to me at
cwu@cucentral-ab.com

Thanx!!!
 
Hi bi,

For the risk of sounding like a broken record ... I'd be interested in your scripts too.
daveh@email.utcourts.gov

Thanks a ton - you know you really asked for this [wiggle] Einstein47
(&quot;For every expert, there is an equal and opposite expert.&quot; - Arthur C. Clarke)
 
Hi bi,
I've been assigned to set up DR center...I'm raw in this area, would appreciate u can send your script to
wong.foongtai@allianz.com.my
10q.

 
Hi bi,

Could you please send a copy of the script to me at
r.mariotti@financialdatacorp.com ?

Thanks
 
Hi bl,

Could you send me a copy of ur scripts to
aixnusr@rediffmail.com

Thanks
 
bi, i don't want to be a pain but i want to make sure you didn't miss my request for that script that gathers other info about the AIX system.

thanks again

dpsmith44@hotmail.com
 
Bi -
Haven't gotten back to you with my email yet. It is:
jcrowe2@clarian.org

PS..I'm the one that posted the original question (jkc924).

Thanks.
 
Hi bl,

Could you send me a copy of ur scripts to

connie_fu@yahoo.com ? Thanks,
 
Hello Bi,

Could you also send me a copy of your scripts?

tnelson1@good-sam.com

Thanks,
Tim

 
By the way, here are a couple scripts I have written for drive space...

******************************************************
# Script1

set -A dlist `lspv | awk '{print $1}' | sort -A`
maxdr=`lspv | wc -l`
let count=0

while (($count < $maxdr));
do
lspv ${dlist[count]}
lspv -l ${dlist[count]}
echo &quot;-------------------------------------------------------------------------&quot;
let count=&quot;count + 1&quot;
done

******************************************************
# Script2

vgexclude1=&quot;rootvg&quot;
vgexclude2=&quot;sysredorollvg&quot;

set -A dlist `lspv | grep -v $vgexclude1 | grep -v $vgexclude2 |awk '{print $1}'`
set -A vglist `lspv | grep -v $vgexclude1 | grep -v $vgexclude2 |awk '{print $3}'`
maxdr=`lspv |grep -v $vgexclude1 | grep -v $vgexclude2 | wc -l`
let count=0
let systotal=0
let sysfree=0

while (($count < $maxdr));
do
ppsize=`lspv ${dlist[count]} | grep &quot;PP SIZE&quot; | awk '{print $3}'`
pptotal=`lspv ${dlist[count]} | grep &quot;TOTAL PPs&quot; | awk '{print $3}'`
ppfree=`lspv ${dlist[count]} | grep &quot;FREE PPs&quot; | awk '{print $3}'`

ddtotal=$(($ppsize * $pptotal))
ddfree=$(($ppsize * $ppfree))

systotal=$(($systotal + $ddtotal))
sysfree=$(($sysfree + $ddfree))

echo ${dlist[count]}
echo ${vglist[count]}
echo &quot;Total: $ddtotal Meg&quot;
echo &quot;Free : $ddfree Meg&quot;
echo &quot;-------------------------------------------------------------------------&quot;
let count=&quot;count + 1&quot;
done

echo &quot;System Total, Excluding: $vgexclude1 and $vgexclude2&quot;
echo &quot;System Total: $systotal Meg&quot;
echo &quot;Total Free : $sysfree Meg&quot;
 
timn,

Both of these scripts are good. the second one might be especially useful to jkc924 because you give disk totals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top