coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Monday September 6, 2010


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 33 guests online

Newest Member

Starmamex

Hit Counter
4760818 Visitors

cool Statistics
coolcommands:1313
Categories:82
Total queries:523831
Members:4281





Search coolcommands.com
Search Keyword:


coolcommand

lsvg.sg - script to summarize volume group usage on an IBM AIX server
Description

Here is a script to summarize all volume group usage on an IBM AIX server:

#!/bin/sh

for vg in `lsvg`
do
TMPFILE=/tmp/lsvg.$vg.$$
lsvg $vg > $TMPFILE
TOTALPP=`grep "TOTAL PPs:" $TMPFILE | awk '{print $7}' | cut -c2-`
FREEPP=`grep "FREE PPs:" $TMPFILE | awk '{print $7}' | cut -c2-`
USEDPP=`grep "USED PPs:" $TMPFILE | awk '{print $6}' | cut -c2-`
# used multiply by 100 and divide by 100 otherwise we get answer of 0
# because it returns an integer and not a floating point
USED=`expr $USEDPP \* 100 / $TOTALPP \* 100 / 100`

echo "VOLUME GROUP: $vg"
echo "TOTAL : $TOTALPP MB"
echo "FREE : $FREEPP MB"
echo "USED : $USEDPP MB"
echo "% USED : $USED %"
echo ""
rm -f $TMPFILE
done
Example

lsvg.sh

Return to search results

Random coolcommands

coolcommand: bash programmable completion
Example: ssh [Tab]
[show me the details]
coolcommand: model - to print hardware model information in HP/UX
Example: model
[show me the details]
coolcommand: how to mirror the rootvg in IBM Virtual I/O Server
Example: mirrorios -f hdisk1
[show me the details]
coolcommand: how to do a reconfigure boot or reboot in Sun Solaris
Example: boot -r; reboot -- -r; touch /reconfigure; init 6
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1138
audet37
kah00na32
Mariom24
lebjf00013

Top 5 Searches

Category Solaris42690
Category AIX38082
Category General UNIX34254
solaris20802
aix19388

Terms of Use
Privacy
Contact


 
coolcommands.com © 2010. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum