![]() ![]() Options of different types may be freely mixed, but conflicts can appear. ![]() GNU long options, which are preceded by two dashes.BSD options, which may be grouped and must not be used with a dash.UNIX options, which may be grouped and must be preceded by a dash.The ps command accepts three styles of options: You are encouraged to view the ps man page and familiarize yourself with some of the other options, as there are just too many to cover here. There are quite a number of options - the ps -ax and ps -ef commands shown above are quite common. PPID - the parent process ID - when the PPID is 0 that means the process was started by the boot process. Using the -ef options gives a slightly different output: The STAT column refers to what state (as previously discussed) the process is in. Notice the TTY is a question mark, because this process is NOT associated with a terminal session. There are numerous options for the ps command - and the output is different with the different options. This is because bash is just a parent process for different processes which needs bash for their execution, and bash itself is not utilizing any CPU time till now. In the above example we found that for bash no CPU time has been given. It is nothing but the total accumulated CPU utilization time for any process and 00:00:00 indicates no CPU time has been given by the kernel till now. Note – Sometimes when we execute ps command, it shows TIME as 00:00:00. TIME – amount of CPU in minutes and seconds that the process has been running.ĬMD – name of the command that launched the process. TTY – terminal type that the user running this command is logged into. The result contains four columns of information: ![]() The application shall ensure that the userlist is a single argument in the form of a or -separated $ ps Write information for processes whose real user ID numbers or login names are given in userlist. In the listing, the numerical user ID shall be written unless the -f option is used, in which case the login name shall be written. The application shall ensure that the userlist is a single argument in the form of a or -separated list. Write information for processes whose user ID numbers or login names are given in userlist. ![]() On XSI-conformant systems, they shall be given in one of two forms: the device's filename (for example, tty04) or, if the device's filename starts with tty, just the identifier following the characters tty (for example, "04"). Terminal identifiers shall be given in an implementation-defined format. The application shall ensure that the termlist is a single argument in the form of a or -separated list. Write information for processes associated with terminals given in termlist. The application shall ensure that the proclist is a single argument in the form of a or -separated list. Write information for processes whose process ID numbers are given in proclist. Multiple -o options can be specified the format specification shall be interpreted as the -separated concatenation of all the format option-arguments. This is fully described in the STDOUT section. Write information according to the format specification given in format. The name of the default file and the format of a namelist file are unspecified. Specify the name of an alternative system namelist file in place of the default. (See STDOUT for the contents of a long listing.) The application shall ensure that the grouplist is a single argument in the form of a or -separated list. Write information for processes whose real group ID numbers are given in grouplist. Write information for processes whose session leaders are given in grouplist. (See the STDOUT section for the contents of a full listing.) Write information for all processes, except session leaders. Implementations may omit session leaders from this list. Write information for all processes associated with terminals. Ps provides numerous options for manipulating the output according to our need. proc contains virtual files, which is the reason it’s referred as a virtual file system. It reads the process information from the virtual files in /proc file-system. The ps command is used to list the currently running processes and their PIDs along with some other information, which depends on different options. Linux provides a utility called ps (which stands as abbreviation for “Process Status ”) for viewing information related with the processes on a system. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |