Understand Linux Htop Visually

If you want to know exactly what’s going on in your Linux system, some of you might reach for top. For the connoisseur of system monitors, nothing less than htop will do. Not familiar with htop? [Umer Mansoor] did a beautiful job of explaining it graphically.

We’ve mentioned htop in a previous Linux Fu, but we’ve never gotten a chance to dig into it. And now, we don’t have to.  Like top, the htop program is still text-based, but it has a much nicer interface with colors, and easier way to send signals to processes, and support for tree displays. You can even use the mouse with it if you want to.

[Umer] did a lot of work to take screenshots of htop at work and annotate them. Sure, you could read the man page, but we think this is a lot better.

Of course, there are other improvements to top. Glances is pretty interesting, for example. For serious system administration help, you can try Webmin or Cockpit.

33 thoughts on “Understand Linux Htop Visually

          1. The system monitor window (or xterm, or term) would constantly update with background processes, instead of showing the “top” resource users, it gave an overview, such as
            so and so logged on (locally or remotely)…
            But a really nice thing was if disk or other errors were occurring, you’d see them as they happened. (Uh-oh! We’re getting lot of errors with disk2 partition b, we should check into that!)
            SunOS had one in the admin or sysop screens, other UNIX machines did too. It was really handy.

            It was sort of like “live” dmesg.

      1. It was based on xload and was just a very tiny widget in the upper right corner that showed the system cpu load as a graph. You can still enable in on Ubuntu, I’ve seen it on some work laptops.

        1. The one I’m thinking about was scrolling text, not graphical, but we did use the graphical one sometimes as well. On SunOs, the graphical one showed that running SunOS consumed ~25% of the processes (Sparcstation 1).

          1. On FreeBSD here, but I start xconsole before the slim login manager and before my window manager. Although I think all it is doing is reporting what dmesg reports. But it sounds similar to what your describing, which I presume is what you would see on on the console when xorg is not running, just in a window.

    1. I also remember and miss it. I end up simulating it with a terminal running tail -f /var/log/kern.log, but it isn´t the same thing.

      We had it in HPUX, Solaris and I think but not sure in the stations connected to an IBM AIX system…

    2. There’s a really nice combined graphics and text monitor called gkrellm. Configurable, it can include CPU speeds and loads, top processes, temperatures, voltages, fan speeds, disk and internet activity, memory and swap space, date, time, and up time.

    3. Are you thinking of xconsole? You still get it on a default graphical openbsd install. The program exists in Ubuntu but I don’t think there is a console device configured.

    1. I also install on every machine I have. Not shown above is the header which shows all the threads the CPU has and their current usage, plus other extra info. I usually just have it up in the right corner of my monitor to glance at.

  1. You can say “ncurses-based” instead of “text-based,” if you’d like. With that said, one overlooked feature of htop is mouse interaction. Even when using PuTTY, you can click and select and toggle things using a mouse. Not an expected feature, but when in a GUI, it’s an added layer of convenience.

  2. I use htop. But I still prefer top. It gives me more stats at a glance than htop does. Htop is definitely nice to see which CPUs are busy. But all those pretty graphs can soak up a lot of space when dealing with 12, 24 or more cores, especially if you throw in hyperthreading, which doubles the number of cores being shown. I’ll have to check out this “glances” I hadn’t heard of that one yet.

  3. I use htop and glances depending on mood.
    Also use ncdu ( shows disk usage, allows nice tricks like showing number of files all the way down instead of disk usage, very convenience when cleaning up old massive file trees so they are quicker to backup )

  4. My coworkers all use htop. And when I ask important system performance questions they are unable to answer because htop doesn’t display them. It’s a toy application as far as I’m concerned. If you can’t see io wait or what channel/queue a task is in, you’ll have a heck of a time trying to figure out why drivers or hardware is misbehaving. You’ll keep thinking your system is slow even though the cpu usage appears low (when you should be looking at load average to determine if a system is idle or not)

  5. The combined features of htop make this tool perfect for troubleshooting. It replaces many steps. The article scratches only on the surface. You have top on steroids where you can SEARCH inside and SCROLL through verv, very long commands which top cannot display properly. You can NICE and KILL processes directly, without leaving htop. You can display TREE, no need to exit htop for this. htop is in maybe 80% of all cases the first and only command i need to identify a problem.

  6. Am I being silly for liking Windows Task Manager more? I would like to see which processes hug too much the CPU, or the network, or the disk, combined with a nice responsive interface. Responsive = can be resized. Under *nix I have to resort to htop + iotop + various widgets, neither of them does a full job.
    The task manager is also not perfect, I would like to have the data from Resource Monitor at a glance: e.g. which files are being written to/read from right now from which processes.

    My perfect monitor: works in text or graphics mode, can show or hide CPU, network, GPU, I/O bandwidth (including USB). The most intensive processes are shown including which files they access and/or network connections. The ability to force stuff to run single-threaded so that the CPU boost functionality is better used.

    1. Mac’s Activity Monitor is also quit a bit nicer than the usual *nix tools, right up there with Windows Task Manager in my opinion. And remember most Linux desktop environments (GNOME, LXDE, etc) come with some reasonable clone of Task Manager.

      I use gkrellm on my Linux box for my GUI needs, it’s a widget that graphs a bunch of stuff like network traffic, hard drive I/O, cpu, memory. But doesn’t let me dig in and kill stuff, and is a less powerful tool. It’s a lot like Conky in terms of the niche it fills.

      And finally I would recommend Stacer if you can accept a GUI-only solution.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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