Robotic Tendencies
The personal blog of Robert McQueen

March 13, 2009

Top acts

I’ve been very impressed several times in the past few months when I’ve discovered awesome new top-like utilities. I’m probably being slow on the uptake and everyone else but me knows about these, but in case its not just me thats been stuck in the ’70s:

htop
A much-needed refresh of oldschool top, this still works on your beloved console but gives you visual bar-graphs of CPU, RAM and swap, lets you scroll through the processes and deliver signals/renicing without having to copy the PID off the moving target. Its like the future!
iftop
One of those things I use so often now I have no idea how I even survived without it. Why is this server lagging, who’s hogging the wireless/DSL, which VM is chewing all of the upstream bandwidth? iftop shows you at a glance how much traffic is being used by which host pairs on a given interface, and you can toggle port numbers on and off with simple key-presses. Absolutely indispensable.
iotop
Does this box feel slow to anyone else? Is it swapping, or is it the database server chewing all the IO? Why does my drive keep seeking? It’s amazing… top for IO bandwidth usage!

A passing mention is deserved for apachetop too, which is pretty neat, but when a server is being hammered it’s not something I found too hard to get a feel for just by tailing the log for a while, so it’s not been as life-changing as the others. Maybe that just means my servers don’t see enough traffic.

posted by ramcq @ 10:45 pm
Comments (21) .:. Trackback .:. Permalink

21 responses to “Top acts”

  1. Louise says:

    Don’t forget mytop =)

    Or

    lsof
    nmon
    iostat -k 1

  2. Mauro says:

    Perhaps you might want to try ‘mytop’ or ‘ptop’, for MySQL and PostgreSQL respectively

  3. plaes says:

    Thanks for the iotop link, but here’s a few more you might like: powertop, latencytop, atop (combines almost everything) and xrestop.

  4. Anthony says:

    Wow, thanks so much, especially for pointing out iotop.

  5. Dieter_be says:

    I really like iotop, though it needs io accounting enabled in the kernel and I noticed several distro’s leaving this off by default. (I don’t think it causes that much overhead though).

    Mytop (http://jeremy.zawodny.com/mysql/mytop/) is also very useful if you’re a mysql DBA.

  6. Frej Soya says:

    Check out gnome-system-monitor, it’s quite nice these days.

    The graphing does eat too much cpu though, which is a bit silly when measing CPU usage….

  7. Daniel Berrange says:

    If you’re using Xen / KVM virtualization via libvirt, then there is another ‘top’ you might be interested in, namely virt-top (http://et.redhat.com/~rjones/virt-top/). Shows a summary of your virtual machines, allowing ordering by CPU usage, disk or network I/O rates

  8. Stéphane says:

    Don’t forget powertop!

  9. Albert Lash says:

    Thanks! I had never heard of htop/iotop before but they are great. You might also want to mention powertop which is great for finding out what processes are causing interrupts.

  10. Ross Burton says:

    Ooooh, iftop. Pretty much exactly what I wanted, although it would be great if it did process name lookups and let me see cumulative totals per connection.

  11. olv says:

    I also used “nethogs” a lot.

  12. Wade Menard says:

    Thanks… I had never heard of iotop. Looks useful. I like the ideas of htop but its just never really replaced top for me. Not sure why. I do like atop when I need longer-term stats, though it requires setuid/root.

  13. herzi says:

    Don’t forget nload (which I prefer for just checking how much bandwidth I currently use) and xrestop (x11 server side ressource usage).

  14. klando says:

    You also have ptop : a top-like for PostgreSQL
    http://ptop.projects.postgresql.org/

  15. You’re not slow – I’ve been using htop for years, but everywhere I go, people are still torturing themselves with plain top. Evangelize! Friends don’t let friends use top.

    We should form some kind of secret society.

  16. Craig Hughes says:

    I’d also highly recommend atop, which combines disk and network I/O into the usual “top” report, and also tracks processes which exited during the snapshot interval, which regular top doesn’t do.

  17. The future I tell you! The future!

  18. Alban says:

    Also mtop, for mysql

  19. Toby says:

    On the ‘top’ theme, there is also mytop (and innotop).

    http://www.xaprb.com/innotop/
    http://jeremy.zawodny.com/mysql/mytop/

Leave a Reply to Ross Burton Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.