The -e option generates a list of information about every process currently running. Thus, the following could be (and sometimes is) used in place of the above command:Īn alternative set of options for viewing all the processes running on a system is In contrast to most commands, the hyphen preceding ps's options is optional, not mandatory. The process state codes include D, uninterruptable sleep N, low priority R, runnable (on run queue) S, sleeping T, traced or stopped Z, defunct ( zombie). The output can be advanced one screen forward by pressing the SPACE bar and one screen backward by pressing the b key.Īmong the information that ps -aux provides about each process is the user of the process, the PID, the percentage of CPU used by the process, the percentage of memory used by the process, VSZ (virtual size in kilo bytes), RSS (real memory size or resident set size in 1024 byte units), STAT (the process state code), the starting time of the process, the length of time the process has been active and the command that initiated the process. The -x option adds to the list processes that have no controlling terminal, such as daemons, which are programs that are launched during booting (i.e., computer startup) and run unobtrusively in the background until they are activated by a particular event or condition.Īs the list of processes can be quite long and occupy more than a single screen, the output of ps -aux can be piped (i.e., transferred) to the less command, which lets it be viewed one screenful at a time. The -u option tells ps to provide detailed information about each process. A group leader is the first member of a group of related processes. The -a option tells ps to list the processes of all users on the system rather than just those of the current user, with the exception of group leaders and processes not associated with a terminal. This information is generally only useful on a multi-user network.Ī common and convenient way of using ps to obtain much more complete information about the processes currently on the system is to use the following: TTY (which now stands for terminal type but originally stood for teletype) is the name of the console or terminal (i.e., combination of monitor and keyboard) that the user logged into, which can also be found by using the tty command. CMD is the name of the command that launched the process. TIME is the amount of CPU (central processing unit) time in minutes and seconds that the process has been running. The four items are labeled PID, TTY, TIME and CMD. ps itself is a process and it dies (i.e., is terminated) as soon as its output is displayed. A shell is a program that provides the traditional, text-only user interface in Unix-like operating systems for issuing commands and interacting with the system, and it is bash by default on Linux. When ps is used without any options, it sends to standard output, which is the display monitor by default, four items of information for at least two processes currently on the system: the shell and ps. Every process is assigned a unique PID by the system. The ps (i.e., process status) command is used to provide information about the currently running processes, including their process identification numbers (PIDs).Ī process, also referred to as a task, is an executing (i.e., running) instance of a program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |