coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Sunday May 27, 2012


 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 25 guests online

Newest Member

beyondimagem

Hit Counter
9133534 Visitors

cool Statistics
coolcommands:1330
Categories:83
Total queries:595500
Members:16437





Category Search coolcommands.com
Select Category:


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: oslevel - how to list the names of known maintenance levels of IBM AIX 5L
Example: oslevel -rq
[show me the details]
coolcommand: smc - how to start the Solaris Management Console gui
Example: /usr/sbin/smc
[show me the details]
coolcommand: lshwres command will list hardware resources configuration
Example: lshwres -m "managed-system" [-p "partition-name" | —all ] -r [ resource-type ] [ -y "led-type" ] [ -F < format > ] [—help ]
[show me the details]
coolcommand: script - how to make a typescript of a terminal session
Example: script /tmp/myactions.log
[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

lvo1152
audet37
kah00na32
Mariom24
lebjf00014

Top 5 Searches

Category Solaris49379
Category AIX46267
Category General UNIX43933
solaris22927
aix22116

Terms of Use
Privacy
Contact


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