Home Download Ubuntu

Monitor for system resources and process activity with atop in Ubuntu


Atop is an ASCII full-screen terminal performance monitor, similar to the top command, but atop only shows the active system-resources and processes, and only shows the deviations since the previous interval.
At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks and network layers, and it shows for every active process the CPU utilization in system and user mode, the virtual and resident memory growth, priority, username, state, and exit code.
The process level activity is also shown for processes which finished during the last interval, to get a complete overview about the consumers of things such as CPU time.

The main things it can do:

*Resource consumption by all processes
*Utilization of all relevant resources
*Permanent logging of resource utilization
*Highlight critical resources
*Watch activity only
*Watch deviations only
*Accumulated process activity per user
*Accumulated process activity per program
*Disk and network activity per process

To install atop:

sudo apt-get install atop


After Atop has started you can press some keys (as shown below) to see different configuration status and command lines:


Figures shown for active processes:
'g' - generic info (default)
'm' - memory details
'd' - disk details
'n' - network details
's' - scheduling and thread-group info
'v' - various info (ppid, user/group, date/time, status, exitcode)
'c' - full command-line per process

Accumulated figures:
'u' - total resource consumption per user
'p' - total resource consumption per program (i.e. same process name)

Sort list of active processes in order of:
'C' - cpu activity
'M' - memory consumption
'D' - disk activity
'N' - network activity
'A' - most active system resource (auto mode)

Screen-handling:
^F - show next page in the process-list (forward)
^B - show previous page in the process-list (backward)

Miscellaneous commands:
'i' - change interval-timer (0 = only manual trigger)
't' - manual trigger to finish interval
'T' - show previous interval again (raw file viewing)
'r' - reset counters to zero (or rewind for raw file viewing)

'U' - focus on specific user name (regular expression)
'P' - focus on specific process name (regular expression)

'a' - active processes only (default) or all processes (toggle)
'z' - pause-button to freeze current sample (toggle)
'f' - fixate on static range of header-lines (toggle)
'x' - use colors to indicate high occupation (toggle)
'1' - show average-per-second i.s.o. total values (toggle)
'l' - limited lines for per-cpu, disk and interface resources
'k' - kill a process (i.e. send a signal)

'V' - version-information


Some examples:

sudo atopsar -c 5 5


With the flag -c in the following example a report is generated about current CPU utilization of the system during 5 minutes (five times with an interval of five seconds):

ubuntu  2.6.31-14-generic-pae  #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009  i686  2009/12/10

-------------------------- analysis date: 2009/12/10 --------------------------

21:20:18 cpu %usr %nice %sys %irq %softirq %steal %wait %idle _cpu_
21:20:23 all 1 0 2 0 0 0 0 97
21:20:28 all 0 0 0 0 0 0 0 100
21:20:33 all 1 0 2 0 0 0 0 97
21:20:38 all 0 0 0 0 0 0 0 99
21:20:43 all 0 0 2 0 0 0 0 98


With the flag -A in the following example all available reports are generated, starting from 13:00 (optional flag -b) till 13:35 (optional flag -e) reading today's raw file as written by the atop command (default):

sudo atopsar -A -b 13:00 -e 13:35


This output will not be listed here as is very large, but you can try it yourself.

Resources: Official Homepage, Canonical.com

0 comments:

Post a Comment