Operating System - HP-UX
1844169 Members
2683 Online
110229 Solutions
New Discussion

To findout the highest bps usage in iostat output.

 
rveri
Super Advisor

To findout the highest bps usage in iostat output.

Hi All,

How to findout the highest bps usage from iostat output:

For example: for disk c56t6d1 the bps is highest here (738): How to find it out through a script:
The command used is :
# iostat 5 5 > iostat.output

c56t12d6 37 4.6 1.0
c56t1d2 0 0.0 1.0
c56t1d4 0 0.0 1.0
c56t1d6 0 0.0 1.0
c56t1d7 0 0.0 1.0
c56t2d3 0 0.0 1.0
c56t2d5 0 0.0 1.0
c56t2d6 0 0.0 1.0
c56t3d0 0 0.0 1.0
c56t3d2 0 0.0 1.0
c56t3d3 0 0.0 1.0
c56t3d6 0 0.0 1.0
c56t4d0 0 0.0 1.0
c56t4d4 3 0.3 1.0
c56t4d5 0 0.0 1.0
c56t4d6 0 0.0 1.0
c56t5d2 0 0.0 1.0
c56t5d3 0 0.0 1.0
c56t6d1 738 26.4 1.0
c56t6d2 0 0.0 1.0
c56t6d6 0 0.0 1.0
c56t8d7 21 2.6 1.0
c56t9d1 0 0.0 1.0
c56t9d4 0 0.0 1.0
---------------------------------------

Thanks,
1 REPLY 1
Ivan Krastev
Honored Contributor

Re: To findout the highest bps usage in iostat output.

Just sort it:

cat iostat.output | awk '{print $2}' | sort | tail -1


regards,
ivan