Monitoring Processes in Real Time

The ps command is a great way to get a snapshot of the processes running on the system, but sometimes you need to see more information to get an idea of just what’s going on in your Linux system. If you’re trying to find trends about processes that are frequently swapped in and out of memory, it’s hard to do that with the ps command.

Instead, the top command can solve this problem. The top command displays process information similar to the ps command, but it does it in real-time mode. FIGURE 9-1 shows a snapshot of the top command in action.

A screenshot shows the output of the top command.

FIGURE 9-1 The output of the top command.Courtesy of Linux Foundation. ...

Get Linux Fundamentals, 2nd Edition 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.