# [OmniOS-discuss] iostat skip first output

Richard Elling richard.elling at richardelling.com
Sun Jan 25 00:02:57 UTC 2015

- Previous message: [OmniOS-discuss] iostat skip first output
- Next message: [OmniOS-discuss] iostat skip first output
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    > On Jan 24, 2015, at 9:25 AM, Rune Tipsmark <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: <http://lists.omniti.com/pipermail/omnios-discuss/attachments/20150124/6022c942/attachment.html>

- Previous message: [OmniOS-discuss] iostat skip first output
- Next message: [OmniOS-discuss] iostat skip first output
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the OmniOS-discuss mailing list