|
| cool Statistics |
| | coolcommands: | 1313 | | Categories: | 82 | | Total queries: | 523831 | | Members: | 4281 | |
|
|
|
 |
|
|
Search coolcommands.com
 |
Submitted by:
lvo   |
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
|  |  |  |  |
|
|
|
|
 |
|
|
|
Top 5 Submitters
|
|---|
| lvo | 1138 |
| audet | 37 |
| kah00na | 32 |
| Mariom | 24 |
| lebjf000 | 13 |
Top 5 Searches
|
| Category Solaris | 42690 |
| Category AIX | 38082 |
| Category General UNIX | 34254 |
| solaris | 20802 |
| aix | 19388 |
|
|
|
|