Bootstrap FreeKB - Linux Commands - ps command - add additional columns (-f)
Linux Commands - ps command - add additional columns (-f)

Updated:   |  Linux Commands articles

The ps command with the -f flag can be used to add the User ID (UID), Parent PID (PPID), Child processes (C), and Start Time (STIME) columns.

[john.doe@server1 ~]$ ps -f
UID          PID  PPID  C STIME TTY          TIME CMD
john.doe   24001 23994  0 17:38 pts/2    00:00:00 bash
john.doe   24535 24001  0 18:05 pts/2    00:00:00 ps -f

 

The -F flag can be used to add the User ID (UID), Parent PID (PPID), Child processes (C), Size (SZ), Real Memory Size (RSS), Process the command is assigned to (PSR), and Start Time (STIME) columns.

[john.doe@server1 ~]# ps -F
UID          PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
john.doe   24001 23994  0  6034  3836   1 17:38 pts/2    00:00:00 bash
john.doe   24547 24001  0  4981  1284   0 18:17 pts/2    00:00:00 ps -F

 

Be aware that TIME will almost always be 00:00:00, even if a process has been running for a while. The -o etime option can be used to determine how long a processes has been running for.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 63b7a6 in the box below so that we can be sure you are a human.