Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iostat script for AIX

Status
Not open for further replies.

made13

MIS
Aug 13, 2003
15
GB
Hi,

The following command outputs the iostat info on a AIX server;

# date; iostat -d | head -2; iostat 2 2 | grep hdisk | sort -n

Wed 13 Aug 14:20:44 2003

Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk0 1.9 15.7 1.6 68753780 61540945
hdisk6 0.0 0.0 0.0 4316 52
hdisk2 0.0 0.0 0.0 22031 0
hdisk3 0.1 5.4 0.1 44720351 4198
hdisk7 0.0 0.0 0.0 4275 68
hdisk5 0.0 0.0 0.0 42333 64
hdisk8 0.0 0.0 0.0 4239 0
hdisk4 0.0 0.5 0.0 3758018 136390
hdisk1 0.8 8.9 0.9 45915156 27887872
hdisk0 0.0 0.0 0.0 0 0
hdisk6 0.0 0.0 0.0 0 0
hdisk2 0.0 0.0 0.0 0 0
hdisk3 0.0 0.0 0.0 0 0
hdisk7 0.0 0.0 0.0 0 0
hdisk5 0.0 0.0 0.0 0 0
hdisk8 0.0 0.0 0.0 0 0
hdisk4 0.0 0.0 0.0 0 0
hdisk1 0.0 0.0 0.0 0 0


I want to exclude the first set of figures for the hdisks, as this is the cummulative figure since system initialization. Is there a way this can be done?
 
Try something like this:
Code:
(date;iostat -d | head -2;iostat 2 2 | grep hdisk | sort) | awk '
/^hdisk/{a[$1]++;if(a[$1]==1)next}
{print}'


Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top