Below is an example of displaying the use of ps. The option-o has also been used. It allows you to specify which information to be displayed. Without dwelling on the possibilities, you just specify here has been chosen to display the PID, PPID (parent PID), the owner and the user program.
Code:
> Ps-e-o "% p% P% U% c"
PID PPID USER COMMAND
1 0 root init
Syslogd root 506 1
1411 1 root httpd
1456 1 root login
Tian 3713 1456 bash
Tian 7083 3713 ps
We thus find it here the init process that has no father (there is no process with PID of 0). Then present syslogd (responsible for registration information messages or error), httpd (web server program) and login. This allows a user to log on the system. We can see here that has to login son bash (bash is the PPID of 1456 that is the PID of init). This is the shell that is launched for the user to interact with the sustem. bash ps as child process that is created by the command issued to obtain this result. Ps does the program provides a snapshot of the current process. There is an executable that displays them at regular intervals. These top that shows the default process in descending order of CPU utilization. It also shows the memory usage making top administration tool useful for determining the resource-intensive programs.
Bookmarks