top question - Unix

This is a discussion on top question - Unix ; I am trying to do a top and then extract the data from this line: CPU states: % idle, % user, % kernel, % iowait, % swap when you save this info to a file its never there. Does anyone ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: top question

  1. top question

    I am trying to do a top and then extract the data from this line:

    CPU states: % idle, % user, % kernel, % iowait, %
    swap

    when you save this info to a file its never there. Does anyone know
    how to capture this.
    thanks


  2. Re: top question

    vaed...@gmail.com wrote:
    >
    > I am trying to do a top and then extract the data from this line:
    > CPU states: % idle, % user, % kernel, % iowait, % swap


    I use -
    sar -u 1 10 | grep Average | awk ' { stuff } '


+ Reply to Thread