Advanced Tips For The ps Command
psall the time to look at processes running on a system. But do you make the best use of the multitude of options this very useful tool has, or do you stick to a tiny, tested handful? Here are some
psoptions to check out that you may not have encountered before.
ps r: Shows only running processes.
ps f: Shows children descended from their parents in an ASCII art tree. I find this very useful when looking at problem processes. Use with the
Soption to see CPU information from children summed up with parents.
ps e: Shows the command environment for each process. This is useful in a situation where a program works for one user but not for another, or on one machine but not on another.
ps -t pts/3: Shows processes associated with the specified tty. I've found this useful when trying to work out who's doing what on a remote machine, and for how long.
ps u: Generates much more readable and human friendly output. Check the manpage for help with output column headings.
uis different from
-u. When combining options, the different option types must be grouped separately (e.g.,
ps Sf -u jkemp.)
There are many more options that I haven't space to discuss here — go check
out the manpage, and get yet more improved and exciting process info (try
Article courtesy of ServerWatch.com
- 1Linux Top 3: Alpine Linux 3.4, deepin 15.2 and Linux Lite 3.0
- 2Linux 4.7 Set to Boost Live Patching, Security and Power Management
- 3Linux 4.6 Charred Weasel adds USB 3.1 Support
- 4Linux Top 3: OpenIndiana 2016.04, Ubuntu 16.04 and Debian's New Leader
- 5Linux Top 3: KaOS 2016.04, TurnKey 14.1 and pfSense 2.3