Operating System Monitoring
24 Secure Services Gateway (SSG) Maintenance Guide
The top command displays currently running processes and important information about the
process, including their memory and CPU usage. The list is both real-time and interactive.
To e xit top, press the q key.
Useful interactive commands that you can use with top include the following:
Memory usage
The free command displays the total amount of physical memory and swap space for the system
as well as the amount of memory that is used, free, shared, in kernel buffers, and cached.
total used free shared buffers cached
Mem: 256812 240668 16144 105176 50520 81848
-/+ buffers/cache: 108300 148512
Swap: 265032 780264252
The command free -m shows the same information in megabytes, which are easier to read.
total used free shared buffers cached
Mem: 250 235 15 102 49 79
-/+ buffers/cache: 105 145
Swap: 258 0 258
Table 3: Interactive Commands
Command Description
[Space] Immediately refresh the display
[h] Display a help screen
[k] Kill a process. You will be prompted for the process ID and the signal to send
to it.
[n] Change the number of processes displayed. You will be prompted to enter the
number.
[u] Sort by user
[M] Sort by memory usage
[P] Sort by CPU usage