10 ps command examples in Linux/Unix
Linux ps commandThe ps command is a basic but important command because it is used to display information about processes running on the system. System administrators often rely on the ps command to monitor currently running processes. There are numerous options available to tweak the output of the ps command and we will be exploring many of them in this article.The ps command obtains it’s information from the /proc virtual file system and displays it to the screen in a meaningful manner as per the options specified while executing the command.It has two distinct modes of syntax: the UNIX style and the BSD style and we’ll cover both in this article.To distinguish between using ps via either of the styles simply be mindful that when using the BSD style the options used with the ps command are not preceded with a dash.With a basic understanding of what the ps command is and where it gets its information from, we now proceed to the examples to understand its usage.Example 1:When run without any options the ps command displays processes owned by the current shell.[root@linuxnix ~]# ps PID TTY TIME CMD 2585 pts/0 00:00:00 bash 9114 pts/0 00:00:00 psGiven below is a brief description of the various fields reported in the output:PID is the Process ID of the running command (CMD)TTY is the place where the running command runsTIME tells about...
Read More