Link to home
Start Free TrialLog in
Avatar of compdigit44
compdigit44

asked on

Check Scritp to find Total # of Unassigned PP's

I'm not an AIX admin by a long shot but I need to write a script that woud do the following.

Take the total number of PP from lsvp -p rootvg and the total PP's from lsvg rootvg and calucation the difference and show this number as the amount of PP's that are unassigned
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Did you ever look at "FREE PPs:" in the output of "lsvg rootvg"?

It should tell you all you want to know.
It even has the number of Megabytes (in parentheses).
Avatar of compdigit44
compdigit44

ASKER

Thanks..

BTW, could can I run two different AIX on the same line and have there results display on screen inwhich they were processed..

for example df -g ; lsvg

When I run the above in a script only the lsvg command is displayed
I'm actually try to run both command in one line and have the results of both command appears in the body of an email

Right now only the last command list shows up in the body of the email
( lsvg ; df -g ) | mail -s "Subject" compdigit@44.com

You can issue an "lsvg vgname" against all of your VGs in one go, like this:

( lsvg | lsvg -i; df -g ) | mail -s "Subject" compdigit@44.com
Thanks.. This is what I was looking for..

Is there anyway to have AIX insert a line break after each command???
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial