#!/bin/sh
# get-iostat
# SunZhenyu, 9/4/04
# sunzhenyu@world2.cn

#### out put of 'iostat -d -h -c 2 -w 1'
#             da0              da1              fd0              md0 
#  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s 
#  0.00   0  0.00   0.00   0  0.00   0.00   0  0.00   0.00   0  0.00 
#  6.33  36  0.22  64.00   1  0.06   0.00   0  0.00   0.00   0  0.00 

# get output(2nd line) from iostat and transpose it to one number per line
/usr/sbin/iostat -d -h -c 2 -w 1 | perl -ne '@_ = /\s+([0-9.]+)/g; if($data and @_){ foreach(@_){print "$_\n";} } $data=1 if(@_);'

