The atop command in Linux is used for system and process monitoring. It provides a detailed overview of system performance, including CPU, memory, disk, and network usage. Common usage involves running atop in the terminal to get a real-time view of resource utilization. this can help in diagnosing performance issues and understanding system behavior over time. It can also log this information for historical analysis.
Basic Usage atop
- This command will start atop and display real-time system performance metrics.
Write log: atop -w /var/log/atop.log 60
This command tells atop to write system performance data to /var/log/atop.log every 60 seconds.
Reading from a Log File: atop -r /var/log/atop.log
-
This command reads the performance data from the specified log file.
it allows you to navigate through the recorded data.
`atop -m
In general:
?
or h
: Request for help information.q
: Quit the program.g
: Show generic output (default).m
: Show memory-related output.d
: Show disk-related output.n
: Show network-related output.s
: Show scheduling characteristics.v
: Show various process characteristics.c
: Show the command line of the process.o
: Show the user-defined line of the process.u
: Show the process activity accumulated per user.p
: Show the process activity accumulated per program.A
: automatically by the most busy system resource.C
: by CPU consumption (default).M
: by memory consumption.D
: by disk accesses issued.N
: by network packets received/transmitted.| Feature | atop
| top
|
|————————–|————————————————–|—————————————–|
| Purpose | system and process monitoring tool | Real-time system and process monitoring tool |
| Detailed Resource Usage | Yes | Basic |
| Historical Data Logging | Yes | No |
| Overloaded Resource Highlighting | Yes | No |
| Cumulative Resource Consumption | Yes | No |
| Daemon Mode for Continuous Logging | Yes | No |
| Process Information | Detailed (CPU, memory, disk, network) | Basic (PID, user, priority, etc.) |
| Sorting by Resource Metrics | Yes | Yes |
| Ease of Use | More complex, in-depth analysis | Simpler, quick real-time snapshot |