The top utility is a commonly used tool for displaying system-performance information. It dynamically shows administrators which processes are consuming processor and memory resources. Top is incredibly handy.
While most administrators quickly grasp the lower portion of top's output, the upper part is harder to interpret. So this article explains the five lines displayed at the top of top:
top
displays uptime informationTasks
displays process status information%Cpu(s)
displays various processor valuesMiB Mem
displays physical memory utilizationMiB Swap
displays virtual memory utilization
Uptime
Top's first line, top, shows the same information as the uptime
command. The first value is the system time. The second value represents how long the system has been up and running, while the third value indicates the current number of users on the system. The final values are the load average for the system.
The load average is broken down into three time increments. The first shows the load for the last one minute, the second for the last five minutes, and the final value for the last 15 minutes. The results are a percentage of CPU load between 0 and 1.0. The processor is likely overworked if 1.0 (or higher) is displayed.
top - 23:03:09 up 4 min, 1 user, load average: 0.75, 0.59, 0.25
[ Get The Automated Enterprise eBook to learn more aboutthe important role IT automation plays in business today. ]
Tasks
The second line is the Tasks output, and it's broken down into five states. These five states display the status of processes on the system:
total
shows the sum of the processes from any state.running
shows how many processes are handling requests, executing normally, and have CPU access.sleeping
indicates processes awaiting resources, which is a normal state.stopped
reports processes exiting and releasing resources; these send a termination message to the parent process.zombie
refers to a process waiting for its parent process to release it; it may become orphaned if the parent exits first.
Zombie processes usually mean an application or service didn't exit gracefully. A few zombie processes on a long-running system are not usually a problem.
Tasks: 220 total, 3 running, 217 sleeping, 0 stopped, 0 zombie
%Cpu(s)
Values related to processor utilization are displayed on the third line. They provide insight into exactly what the CPUs are doing.
us
is the percent of time spent running user processes.sy
is the percent of time spent running the kernel.ni
is the percent of time spent running processes with manually configured nice values.id
is the percent of time idle (if low, CPU may be overworked).wa
is the percent of wait time (if high, CPU is waiting for I/O access).hi
is the percent of time managing hardware interrupts.si
is the percent of time managing software interrupts.st
is the percent of virtual CPU time waiting for access to physical CPU.
Values such as id
, wa
, and st
help identify whether the system is overworked.
%Cpu(s): 19.3 us, 4.0 sy, 0.0 ni, 74.7 id, 0.0 wa, 0.3 hi, 1.7 si, 0.0 st
MiB Memory
The final two lines of top's output provide information on memory utilization. The first line—MiB Mem
—displays physical memory utilization. This value is based on the total amount of physical RAM installed on the system.
MiB Mem: 3898.5 total, 385.2 free, 1167.0 used, 2346.2 buff/cache
Note: The term mebibyte (and similar units, such as kibibytes and gibibytes) differs slightly from measurements such as megabytes. Mebibytes are based on 1024 units, and megabytes are based on 1000 units (decimal). Most users are familiar with the decimal measurement, but it is not as accurate as the binary form. The top utility reports memory consumption in decimal.
total
shows total installed memory.free
shows available memory.used
shows consumed memory.buff/cache
shows the amount of information buffered to be written.
MiB Swap
Linux can take advantage of virtual memory when physical memory space is consumed by borrowing storage space from storage disks. The process of swapping data back and forth between physical RAM and storage drives is time-consuming and uses system resources, so it's best to minimize the use of virtual memory.
MiB Swap: 3898.0 total, 3898.0 free, 0.0 used, 2433.1 avail Mem
total
shows total swap space.free
shows available swap space.used
shows consumed swap space.buff/cache
shows the amount of information cached for future reads.
In general, a high amount of swap utilization indicates the system does not have enough memory installed for its tasks. The solution is to either increase RAM or decrease the workload.
Wrap up
Glancing at the bottom 75% of top's output gives you a sense of what processes are consuming the most resources on the system. This information is often sufficient for many needs. However, the upper portion of top's output allows you to delve more deeply into exactly how the system is performing and whether CPU or RAM (or both) are utilized effectively.
Sobre el autor
Damon Garn owns Cogspinner Coaction, LLC, a technical writing, editing, and IT project company based in Colorado Springs, CO. Damon authored many CompTIA Official Instructor and Student Guides (Linux+, Cloud+, Cloud Essentials+, Server+) and developed a broad library of interactive, scored labs. He regularly contributes to Enable Sysadmin, SearchNetworking, and CompTIA article repositories. Damon has 20 years of experience as a technical trainer covering Linux, Windows Server, and security content. He is a former sysadmin for US Figure Skating. He lives in Colorado Springs with his family and is a writer, musician, and amateur genealogist.
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Programas originales
Vea historias divertidas de creadores y líderes en tecnología empresarial
Productos
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Servicios de nube
- Ver todos los productos
Herramientas
- Training y Certificación
- Mi cuenta
- Soporte al cliente
- Recursos para desarrolladores
- Busque un partner
- Red Hat Ecosystem Catalog
- Calculador de valor Red Hat
- Documentación
Realice pruebas, compras y ventas
Comunicarse
- Comuníquese con la oficina de ventas
- Comuníquese con el servicio al cliente
- Comuníquese con Red Hat Training
- Redes sociales
Acerca de Red Hat
Somos el proveedor líder a nivel mundial de soluciones empresariales de código abierto, incluyendo Linux, cloud, contenedores y Kubernetes. Ofrecemos soluciones reforzadas, las cuales permiten que las empresas trabajen en distintas plataformas y entornos con facilidad, desde el centro de datos principal hasta el extremo de la red.
Seleccionar idioma
Red Hat legal and privacy links
- Acerca de Red Hat
- Oportunidades de empleo
- Eventos
- Sedes
- Póngase en contacto con Red Hat
- Blog de Red Hat
- Diversidad, igualdad e inclusión
- Cool Stuff Store
- Red Hat Summit