Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I get a tree view like the one below on OSX?

vartec@some_server:~$ ps xf
PID TTY      STAT   TIME COMMAND
11519 ?        S      0:00 sshd: vartec@pts/0
11520 pts/0    Ss     0:00  \_ -bash
11528 pts/0    R+     0:00      \_ ps xf

To clarify, I'm mostly interested in the tree structure, not the extended information.

share|improve this question
add comment

2 Answers

You can install the pstree command using either Homebrew (my personal favourite), MacPorts or Fink and you'll get a command-line, tree view of processes on your Mac.

To install with Homebrew it's just:

brew install pstree

Once you have Homebrew on your machine.

share|improve this answer
add comment

You should try --forest.

ps -ef --forest

share|improve this answer
2  
I've just tried it. I'm using OSX 10.6, standard /bin/ps doesn't have that option. –  vartec Apr 11 '11 at 20:35
2  
No OS X ps command has that option as of 10.7.3. –  Ian C. May 6 '12 at 14:41
3  
As of mavericks/10.9, the system ps still doesn't have that option. –  JosephH Dec 2 '13 at 15:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.