Datamation Logo

Tip of the Trade: ps Options

August 13, 2008
Datamation content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Admins use ps all 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 ps options 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 S option 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.

Options can be combined, but note that there are three types of option: a
single dash, a double dash or no dash at all. u is 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 X or s)!

This article was first published on ServerWatch.com.

  SEE ALL
ARTICLES
 

Subscribe to Data Insider

Learn the latest news and best practices about data science, big data analytics, artificial intelligence, data security, and more.

Datamation Logo

Datamation is the leading industry resource for B2B data professionals and technology buyers. Datamation's focus is on providing insight into the latest trends and innovation in AI, data security, big data, and more, along with in-depth product recommendations and comparisons. More than 1.7M users gain insight and guidance from Datamation every year.

Advertisers

Advertise with TechnologyAdvice on Datamation and our other data and technology-focused platforms.

Advertise with Us

Our Brands


Privacy Policy Terms & Conditions About Contact Advertise California - Do Not Sell My Information

Property of TechnologyAdvice.
© 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.