1

I want to know CPU load of each core in a percentage. I execute top and then press 1 Output is something like this:

%Cpu0  :  0.0 us,  0.3 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
  • What does each column mean?
  • Where is the % column?
  • Can I add it?
  • Hmmm.....have you taken a look at the man page? – mdpc Mar 16 '15 at 23:05
  • 1
    @mdpc top manual page fails to explain what the id column means. Neither does it explains which columns to consider when computing CPU activity. – jlliagre Mar 17 '15 at 6:38
1

You can add all columns but the id (idle), wa (io wait) and the st (stolen) ones to get the CPU load.

You'll find most columns meaning in the top manual page:

       us, user    : time running un-niced user processes
       sy, system  : time running kernel processes
       ni, nice    : time running niced user processes
       wa, IO-wait : time waiting for I/O completion
       hi : time spent servicing hardware interrupts
       si : time spent servicing software interrupts
       st : time stolen from this vm by the hypervisor
  • thanks! probably i can use another tool which can "add everything for me"? – javapowered Mar 16 '15 at 21:33
  • Sure, I would use awk but many alternatives might do it too. – jlliagre Mar 16 '15 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.