Do you know of a command line program to watch the processor load on
multiple cores?  (I've been using "top" but it just gives a single
figure.  The other alternatives I've seen only give a point in time.)

The machine I want to watch is a server and doesn't have a gui
installed.  It has twin dual core processors and is running a windows
vm under vmware that is set to use two processors. I'd like to see
whether it is using two of the notional processors or is just mimicing
two processors.

Cheers
Kerry


On 06/03/2008, John Carter <[EMAIL PROTECTED]> wrote:
>  Now, if you have a dual core (like me) or higher processor... watch
>  what happens to your CPU load with something like gkrellm.
>
>  Only one core is doing all the work.
>
>
>  The man page says...
>         --max-procs=max-procs, -P max-procs
>                Run up to max-procs processes at a time; the default is 1.  If 
> max-procs is 0, xargs  will  run
>                as many processes as possible at a time.
>
>  Well, lets make things happen twice as fast....
>
>    find ~/oldmail -type f | xargs -P 2 zgrep -i 'some keyphrase'
>
>  Whoops... That didn't work. Still only keeping one core busy.
>
>  Lets see what happen...
>
>    find ~/oldmail -type f | xargs -P 2 echo ---------MARKER----------- zgrep 
> -i 'some keyphrase'
>
>  ---------MARKER----------- zgrep -i 'some keyphrase' file.1 file.2 file.3 
> .......
>
>  Aha! xargs packed _all_ the files onto the command line of one zgrep
>  instance, it didn't need to invoke a second.
>
>  In fact, if only I had finished reading the man page...
>       Use the -n option with -P; otherwise chances are that only one exec 
> will be done.
>  I would have known that!
>
>  Let's try that again...
>
>    find ~/oldmail -type f | xargs -P 2 -n 1 zgrep -i 'some keyphrase'
>
>  Hmm. That's creating hundreds of setups and tear downs for zgrep. How 
> about...
>
>    find ~/oldmail -type f | xargs -P 2 -n 5 zgrep -i 'some keyphrase'
>
>  Yip. Good balance. Both cores busy full time on useful work.
>
>
>
>  John Carter                             Phone : (64)(3) 358 6639
>  Tait Electronics                        Fax   : (64)(3) 359 4632
>  PO Box 1645 Christchurch                Email : [EMAIL PROTECTED]
>  New Zealand
>
>

Reply via email to