English Korean
indexterm:[system information,gathering]indexterm:[information,about your system] In order to configure the system, system administrators often need to determine the amount of free memory, how much free disk space is available, how the hard drive is partitioned, or what processes are running.
indexterm:[ps] The [command]#ps# command allows you to display information about running processes. It produces a static list, that is, a snapshot of what is running when you execute the command. If you want a constantly updated list of running processes, use the [command]#top# command or the [application]*System Monitor* application instead.
To list all processes that are currently running on the system including processes owned by other users, type the following at a shell prompt:
For each listed process, the [command]#ps ax# command displays the process ID (`PID`), the terminal that is associated with it (`TTY`), the current status (`STAT`), the cumulated CPU time (`TIME`), and the name of the executable file (`COMMAND`). For example:
Apart from the information provided by the [command]#ps ax# command, [command]#ps aux# displays the effective username of the process owner (`USER`), the percentage of the CPU (`%CPU`) and memory (`%MEM`) usage, the virtual memory size in kilobytes (`VSZ`), the non-swapped physical memory size in kilobytes (`RSS`), and the time or date the process was started. For instance:
You can also use the [command]#ps# command in a combination with [command]#grep# to see if a particular process is running. For example, to determine if [application]*Emacs* is running, type:
For a complete list of available command line options, refer to the *ps*(1) manual page.
indexterm:[system information,processes,currently running]indexterm:[top] The [command]#top# command displays a real-time list of processes that are running on the system. It also displays additional information about the system uptime, current CPU and memory usage, or total number of running processes, and allows you to perform actions such as sorting the list or killing a process.
To run the [command]#top# command, type the following at a shell prompt:
For each listed process, the [command]#top# command displays the process ID (`PID`), the effective username of the process owner (`USER`), the priority (`PR`), the nice value (`NI`), the amount of virtual memory the process uses (`VIRT`), the amount of non-swapped physical memory the process uses (`RES`), the amount of shared memory the process uses (`SHR`), the percentage of the CPU (`%CPU`) and memory (`%MEM`) usage, the cumulated CPU time (`TIME+`), and the name of the executable file (`COMMAND`). For example:
xref:System_Monitoring_Tools.adoc#interactive-top-command[Interactive top commands] contains useful interactive commands that you can use with [command]#top#. For more information, refer to the *top*(1) manual page.
Interactive top commands
indexterm:[gnome-system-monitor]indexterm:[System Monitor] The `Processes` tab of the [application]*System Monitor* tool allows you to view, search for, change the priority of, and kill processes from the graphical user interface.
To start the [application]*System Monitor* tool, either select menu:Applications[System Tools > `System Monitor`pass:attributes[{blank}]] from the Activities menu, or type [command]#gnome-system-monitor# at a shell prompt. Then click the `Processes` tab to view the list of running processes.
For each listed process, the [application]*System Monitor* tool displays its name (`Process Name`), user (`User`), percentage of the CPU usage (`% CPU`), process ID (`ID`), memory usage (`Memory`), total disk read and write (`Disk read total` and `Disk write total`), current disk read and write (`Disk read` and `Disk write`), and prioritiy (`Priority`). To sort the information by a specific column in ascending order, click the name of that column. Click the name of the column again to toggle the sort between ascending and descending order.
By default, the [application]*System Monitor* tool displays a list of processes that are owned by the current user. Selecting various options from the View menu allows you to:
edit the [application]*System Monitor* preferences, such as the refresh interval for the list of processes, or what information to show.
You can also end a process by selecting it from the list and clicking the btn:[End Process] button.
indexterm:[free] The [command]#free# command allows you to display the amount of free and used memory on the system. To do so, type the following at a shell prompt:
The [command]#free# command provides information about both the physical memory (`Mem`) and swap space (`Swap`). It displays the total amount of memory (`total`), as well as the amount of memory that is in use (`used`), free (`free`), shared (`shared`), in kernel buffers (`buffers`), and cached (`cached`). For example: