[OmniOS-discuss] iostat skip first output

Rune Tipsmark rt at steait.net
Sun Jan 25 02:59:00 UTC 2015


hi Richard,

thanks for that input, will see what I can do with it.

I do store data and graph it so I can keep track of things :)

br,

Rune

________________________________
From: Richard Elling <richard.elling at richardelling.com>
Sent: Sunday, January 25, 2015 1:02 AM
To: Rune Tipsmark
Cc: omnios-discuss at lists.omniti.com
Subject: Re: [OmniOS-discuss] iostat skip first output


On Jan 24, 2015, at 9:25 AM, Rune Tipsmark <rt at steait.net<mailto:rt at steait.net>> wrote:


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?


iostat -xn 10 2 | awk '$1 == "extended" && NR > 2 {show=1} show == 1'

NB, this is just a derivative of a sample period. A better approach is to store
long-term trends in a database intended for such use. If that is too much work,
then you should consider storing the raw data that iostat uses for this:
kstat -p 'sd::/sd[0-9]+$/'

or in JSON:
kstat -jp 'sd::/sd[0-9]+$/'

insert shameless plug for Circonus here :-)
 -- richard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20150125/050b0604/attachment.html>


More information about the OmniOS-discuss mailing list