Search This Blog


Using PS in Linux

Sometimes ps in Linux can be a bit frustrating in terms of output. We cab resolve this by formatting the output to our liking

I've noticed in the past that sometimes I get "Hiding the command line arguments" and can never get the underlying name of the PID. Though I haven't found out a way to display at least the name there are a couple of workarounds

cat /proc/$(PID)/status

Alternatively you can use a trimmed down ps command

ps -ae

Which will show the name of the command and will not make you hid the "Hiding the command line arguments" anymore.

Displaying the start time

Start time of a PID is defined by STIME and can be formatted to display as follows
ps -aeo pid,stime,cmd,args
Where -o provides custom output formatting which seems to disable the ability to show the process name.

If someone knows how to show the process name in PS as well as the start time let me know.


ps -aeo pid,stime,cmd,args

ps -ae

1 comment:

  1. You have shared a nice article here about the PS Command. Your article is very informative and nicely describes the useful of PS Command in Linux. Thanks for sharing this article here.