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.

I'm looking for a better alternative for top. Both top and Activity Monitor are highly limited with regards to features. In particular, I'm interested in the following features:

  • Limit processes by name
  • Send different kill-signals to a process interactively, i.e. select the process from the process list and send a signal
  • Ability to show the entire command, not only the program name (as top -c does on Linux)
  • Show the status of each process
  • Optional: On Linux, top also updates the command when displayed, i.e. if a process writes in it's own argv during runtime, the updated command will be shown.

Htop is not an option, as it is unstable on Mac OS and only a small subset of it's features actually works on a Darwin system, probably because it partially relies on procfs. Is there a build or fork of htop that works on OS X since it has the features I want if it worked as it does on Linux?

share|improve this question
add comment

3 Answers 3

You can install htop on Mac through brew with the following command: brew install htop

share|improve this answer
1  
Or with macports sudo port install htop –  Matteo Apr 20 '13 at 15:44
    
As I said, htop is not an option. It's features very limited on Mac OS X, most of them simply don't work. –  barbaz Apr 21 '13 at 13:18
add comment

Sending of signals and filtering by user is available out of the box. From man top

   INTERACTION
          When top is run in interactive (non-logging) mode, it is possible to control the output of top, as well as  in-
          teractively  send  signals to processes.  The interactive command syntax is terse.  Each command is one charac-
          ter, followed by 0 to 2 arguments.

   S<signal><pid>
          Send <sig> to <pid>.  <sig> can be specified either as a number or as a name (for example, HUP).   The  default
          signal  starts  out as TERM.  Each time a signal is successfully sent, the default signal is updated to be that
          signal.  <pid> is a process id.

   U<user>
          Only display processes owned by <user>.  Either the username or uid number can be specified.   To  display  all
          processes, press enter without entering a username or uid number.

If you want to extend top yourself, the source code is available on http://opensource.apple.com.

share|improve this answer
    
Thanks for the answer. Yes, I'm aware of that "feature"... however, specifying a signal and a PID is not really what counts as interactive... there is not improved comfort over writing "kill" on the commandline. I mean, the process should be selectable interactively (as in htop) –  barbaz Jan 3 '13 at 10:12
add comment

You can use process explorer for OS X - http://newosxbook.com/ has that as a free download. It's modeled after Linux top, and is much more powerful than Apple's own.

share|improve this answer
    
1. Could you link directly to the download. 2. Be sure to read over the help center on promotion. –  bmike Nov 1 '13 at 4:00
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.