O'Reilly logo

How Linux Works by Brian Ward

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required