Top (software)
top is a task manager or system monitor program, found in many Unix-like operating systems, that displays information about CPU and memory utilization. OverviewThe program produces an ordered list of running processes selected by user-specified criteria, and updates it periodically. Default ordering is by CPU usage, and only the top CPU consumers are shown (hence the name). top shows how much processing power and memory are being used, as well as other information about the running processes. Some versions of top allow extensive customization of the display, such as choice of columns or sorting method. top is useful for system administrators, as it shows which users and processes are consuming the most system resources at any given time. ![]() ImplementationsThere are several different versions of top. The traditional Unix version was written by William LeFebvre and originally copyrighted in 1984.[1] It is hosted on SourceForge,[2] and release 3.7 was announced in 2008.[3] The Linux version of top is part of the procps-ng group of tools. It was originally written by Roger Binns[4] and released in early 1992 but shortly thereafter taken over by others.[5] On Solaris, the roughly equivalent program is prstat. Microsoft Windows has the tasklist command and the graphical Task Manager utility. IBM AIX has an updating running processes list as part of the topas and topas_nmon commands. The load average numbers in Linux refers to the sum of the number of processes waiting in the run-queue plus the number currently executing. The number is absolute, not relative. And thus it can be unbounded; unlike utilization. The instant variations of the number of processes are damped with an exponential decay formula which is calculated using fixed point math.[6] The ps program is similar to top, but instead produces a snapshot of processes taken at the time of invocation. top's n (number of iterations) option can product a similar result, causing the program to run the specified number of iterations, then exit after printing its output. ExampleThe first 5 rows overview the entire system. top - 14:21:23 up 2 days, 21:40, 44 users, load average: 14.44, 14.13, 14.64
| | | |
<time> <system uptime> <user count> <load average for the past 1, 5, 15 minutes>
Tasks: 1552 total, 8 running, 1544 sleeping, 0 stopped, 0 zombie
%Cpu(s): 9.6 us, 0.7 sy, 0.0 ni, 89.5 id, 0.0 wa, 0.0 hi, 0.2 si, 0.0 st
| | | | | | | '------.
<user> <system> <nice> <idle> <IOWait> <hardware/software interrupt> <steal time>
MiB Mem : 1031911.+total, 368915.2 free, 172285.0 used, 490711.5 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 807110.1 avail Mem
The rest of the text provides a table with each row being a process, with the following columns often used out of many possible columns (the choice and ordering of columns are configurable):[8] PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 2456 1612 1500 S 0.0 0.0 0:00.07 init(Ubuntu)
4 root 20 0 2456 4 0 S 0.0 0.0 0:00.00 init
656403 user2 20 0 80.0g 3.6g 370000 S 100.0 0.4 1594:38 python3
2024198 longnam+ 20 0 50.5g 4.7g 609200 S 1.6 0.5 204:46.85 long-name-proc
2056804 longnam+ 20 0 237.1g 31.1g 23.1g S 136.8 3.1 69:54.11 python3
See also
References
External linksWikimedia Commons has media related to Top (software).
|