nevermind, I just made it into tokens and counted my way though it... maybe not 
the best way but it works...



root@zfs10:/usr/lib/check_mk_agent/local<mailto:root@zfs10:/usr/lib/check_mk_agent/local>#
 cat disk_iostat.sh
varInterval=5
varOutput=$(iostat -xn $varInterval 2 | grep c[0-99]);
tokens=( $varOutput )
tokenCount=$(echo ${tokens[*]} | wc -w )
tokenStart=$(((tokenCount/2)-1))
tokenInterval=11
tokenEnd=$((tokenCount))
for i in $(eval echo {$tokenStart..$tokenEnd..$tokenInterval});
 do echo 0 disk_busy_${tokens[$i]} percent=${tokens[$i-1]} ${tokens[$i-1]} % 
average disk utilization last $varInterval seconds;
    echo 0 disk_latency_${tokens[$i]} ms=${tokens[$i-3]} ${tokens[$i-3]} ms 
response time average last $varInterval seconds;
done

________________________________
From: OmniOS-discuss <omnios-discuss-boun...@lists.omniti.com> on behalf of 
Rune Tipsmark <r...@steait.net>
Sent: Saturday, January 24, 2015 6:25 PM
To: omnios-discuss@lists.omniti.com
Subject: [OmniOS-discuss] iostat skip first output


hi all, I am just writing some scripts to gather performance data from 
iostat... or at least trying... I would like to completely skip the first 
output since boot from iostat output and just get right to the period I 
specified with the data current from that period. Is this possible at all?



br,

Rune
_______________________________________________
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss

Reply via email to