Tracking Individual Processes
You saw how to use ps
in Processes for listing process characteristics at any given time. ps
is good for getting a snapshot of the current processes, but it does little to tell you how processes change over time. Using ps
alone, it's not terribly easy to pick out processes that are using too much CPU time or memory.
The top
program displays the current system status and many of the fields that you might see in a ps
listing, but it also updates the display every second. By default, top
shows the most active processes (that is, those currently taking up the most CPU time).
You can send commands to top
with keystrokes. These are some of the most important commands:
- spacebar
Updates the display immediately
M
Sorts by current ...
Get How Linux Works now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.