Two handy alternatives to the top command: htop and atop

By
Posted on
Tags: top, atop, htop, sysadmin

I recently started using two handy variants of top, the standard Unix tool for monitoring what’s going on with processes on a system.

The first, htop, uses ncurses to provide a more interactive process-viewing experience. You can surf through running processes, scrolling horizontally and vertically to reveal information that would otherwise have been clipped, information such as full command lines. Further, you can drive a cursor to select processes for commands like kill and lsof to act upon. Yes, you can see what files a process has open; you can even trace processes using strace. There’s also a handy tree view for understanding process ancestry.

The second top alternative, atop, offers more accurate accounting of processes and resource usage. It tracks all processes, even those that have lived out their brief lives between atop’s screen updates. This comprehensive accounting is helpful for understanding problems caused by herds of individually short-lived processes. With the old top, you might catch only a few of the processes in the act, but with atop, you can see the herd for what it is.

Two handy tools – check them out.