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
LVL 20
Who is Participating?
( lsvg; echo; df -g ) | mail -s "Subject"
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).
compdigit44Author Commented:

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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

compdigit44Author Commented:
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"

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

( lsvg | lsvg -i; df -g ) | mail -s "Subject"
compdigit44Author Commented:
Thanks.. This is what I was looking for..

Is there anyway to have AIX insert a line break after each command???
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.