1

I am working on ARM-based processor (OS version: Linux 3.4.35) and I need to analyze the processor's performance while some processes are running, by typing top command, I can see some statistics but I do not understand the details there, what information should I look for ?

Here the details I need to understand (difference between CPU usr and CPU sys, what is nic, idle, io irq and sirq and how to clear cached RAM):

Mem: 32184K used, 648K free, 0K shrd, 676K buff, 7536K cached
CPU: 11.7% usr 29.4% sys  0.0% nic 41.1% idle 11.7% io  0.0% irq  5.8% sirq

1 Answers1

0

The best place to get started with learning about a given Linux/Bash command is to reference the manual page or manpage of the given command.

Here is a link to a top manpage. In shell, you should be able to read the manpage by simply executing man top. I will also include a link to a blog explaining top.

The relevant part to your question can be found at section 2b. TASK and CPU States of the manpage:

As a default, percentages for these individual categories are displayed. Where two labels are shown below, those for more recent kernel versions are shown first.

       us, user    : time running un-niced user processes
       sy, system  : time running kernel processes
       ni, nice    : time running niced user processes
       id, idle    : time spent in the kernel idle handler
       wa, IO-wait : time waiting for I/O completion
       hi : time spent servicing hardware interrupts
       si : time spent servicing software interrupts

us and ni are the percentage of CPU usage spent on un-niced and niced processes respectively. Nice values are user space processes that are either nice or not in that they can be given a priority value that either cooperates and gets out of the way of more important kernel or system processes or does not. Here is a link to a fairly straightforward explanation of niceness and priority.

The others should be rather straightforward:

idle is how much of the processor's capacity is idle or unused. io is the Input/Output queue of the processor. irq and srq are hardware and software interrupts respectively.

If you want more information on how to sort top output, here is a relevant Stack Overflow post. Additionally if you want to know more about clearing cached memory/buffers, here is a U&L stack exchange post.

Please read over all the links I have provided and if needed you should dig a little deeper and research more into how Linux processing and memory handling works. There is a wealth of information out there online.

kemotep
  • 5,280
  • 7
  • 21
  • 36