You are probably quite familiar with top and that it is a useful command line tool. Well we are going to look at a couple of top-like tools that provide a diffent view of what is running on your Server.
htop and atop – taking top to the top
By default neither of these will be installed on your Linux server, so you will have to install them before using. I will leave that as an exercise for you to do.
htop – is very similar to top but it creates ascii graphs for processor, memory and swap usage, then puts a summary of tasks, load and uptime in the header area as well. For those that like to see a chart, rather than numbers it is a bit easier to read. On first glance, it does not appear to be much different than top, but it is.
One of the big differences is that you can scroll down the process list and actually see every single running process on the server. Yes, the display still updates frequently as well.
If you look at the bottom row, there is a series of Menus you can access with the “F” keys (F1 thru F10). You can search, change the sort order and renice a selected process all at the click of a single button. You can navigate around the screen with the Arrow keys.
If I were to give a quick summary comparing htop with top, is that it is a user-friendly top replacement. Check out the sceeenshot below.
The first difference you will notice with atop is that the header has a lot more information – It has a line showing process information, A line for each CPU and a CPU Avg line A line with Memory info, a line for Swap info, a line for each Disk and some Network lines – transport, network and Devices. The number of header lines will change with system events and will change colour as well (eg disk line changes red if there is heavy disk activity)
After you get past the header, the bottom section shows the process list in much the same way as top (and atop), but by default, it only shows processes that are being used at the time, all idle processes are hidden. To change the display, just like top, you can hit the “h” key for Help on the hotkeys and what you can change. Unlike top, which only has a handful of parameters, atop has a lot more options. See an example screenshot below.
The quick summary for atop compared to top is that it has a lot of additional information all available from the one place, it is Advanced, and much more than top.
2 new tools to explore and help you manage your system, one that is simpler than the standard top and one that is much more advanced. My personal preference is that I use the standard top and also install atop.
These 2 examples I have given are not the only “top” or top-like cloned applications for the System Admin – 2 others I will mention in passing are ntop – a Network Top clone and mytop – a MySQL top clone.