Alias for displaying a process tree nicely

alias pst='pstree -Alpha'
By 'pst' you can print out process tree with all details about all processes (including a command line, PID, and the current process you are running in). By 'pst username' you can get an information about processes belonging to the particular user 'username'.
Sample Output
...
  |-(events/6,32)
  |-(events/7,33)
  |-gam_server,3914
  |-gdm-binary,4670 -nodaemon
  |   `-gdm-binary,4766 -nodaemon
  |       |-Xorg,4771 :0 -br -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
  |       `-gdmgreeter,4786
  |-gdm-rh-security,4768
...

0
By: Alexander
2009-03-20 10:53:37

These Might Interest You

  • I got really tired of having tree always show me tons of .svn and .git stuff that I don't care about. With this alias, "tree" uses pretty colors, snazzy line graphics, and ignores any source control and package mumbojumbo. (Customize the *.*.package glob, of course.) Show Sample Output


    7
    alias tree="tree -CAFa -I 'CVS|*.*.package|.svn|.git' --dirsfirst"
    isaacs · 2009-03-27 05:13:39 0

  • -16
    alias up="cd .."; alias upp="cd ../.."; alias uppp="cd ../../.."; alias upppp="cd ../../../.."; alias uppppp="cd ../../../../.."
    swmcd · 2009-03-30 03:27:21 4
  • Hides the process "your_command" from showing with ps, displaying some other random process name already running for a better camouflage. Show Sample Output


    0
    exec -a "$(ps -fea | awk '{print $8}'| sort -R | head -n1)" your_command -sw1 -sw2
    pulketo · 2017-11-19 04:36:24 1
  • whowatch is a interactive, ncurses-based, process and users monitoring tool, which updates information in real time. This is a perfect tool for local and remote servers. It displays information about the users currently logged on to the machine, in real-time. Besides standard information (login name, tty, host, user's process), the type of the connection (ie. telnet or ssh) is shown. Display of users command line can be switch to tty idle time. Certain user can be selected and his processes tree may be viewed as well as tree of all system processes. Tree may be displayed with additional column that shows owner of each process. In the process tree mode SIGINT and SIGKILL signals can be sent to the selected process. Killing processes is just as simple and fun as deleting lines on the screen.


    4
    whowatch
    cryptema · 2011-06-30 22:45:39 1

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: