SvennD
top explained visually
February 21, 2017

top explained visually

Posted on February 21, 2017  •  5 minutes  • 916 words  •  Suggest Changes

A while ago, I read this blog post htop explained visually. I  liked the idea of visually representing htop, but beside the result of a visual representation it gives a good opportunity to dive in to those columns you silently have been ignoring for a large time. The author of the idea commented “_I hope this post and your comment inspire people to create visual explanations for other unix commands, especially those that pack a lot of information on one screen :)” _hence my attempt to do something similar with the much more widespread command : top. As an extra point, I also used Inkscape the more open version of Illustrator/Photoshop. (please note that you can make way, way more beautiful drawing in inkscape then what I made)

I guess all (most ?) distributions come with top so everyone should be able to just run it, there are some optional parameters but none are required; In case you have never seen top, its a full console application, similar to the windows “task manager”.

top screen in Linux

Now just like the original htop post, I split the “header” and “body” part to make annotations more clearly. I also included some description below cause some just require more info and can’t be packed in a image. (or maybe they can and I just suck at infographic)

Visually explained the top part of the top Linux tool

(uptime) The first line is exactly the same as the output of the command uptime this returns the (1) time since boot, (2) logged in users and (3) the average load of the last 1, 5 and 15 minutes. You can find out who is logged in, using the command w . Yes “w” is a command. The average load is a bit more difficult, basically for every CPU you can have 1 load. So a load of 1.7 over a quad-core is perfectly fine. You can find more online, but this seems a well written article (no affiliation).

(tasks) The next part is more interesting, it shows all tasks (total), the running tasks, the sleeping tasks the stopped tasks and the zombie tasks.

(CPU) This is where the real juice is; Lets go over every value separate :

Again, interesting read by scoutapp

(mem + swap) These speak for them self, the only weird part is the buffer/cached; Linux uses as much memory as is useful to it, this includes using cache for slow spinning disks. That means that the free amount of memory/cache is lower then what you would expect. Buffered and cached memory is available to applications when they request it, its just used since its sitting there. Read more about memory/swap management on LinuxatemyRAM.

We then see the “body” part of top, which (I was surprised) is very similar to the lower section of htop.

Visually explained the bottom part of the top Linux tool

Most speaks for itself; some weird twerks I did not know, but I think is correct :

man top actually is very useful, although a bit longish. Another useful tool is explainshell.com not as much for top, but for sure for more parameter heavy commands, such as tar/find/…

I don’t think visualizing commands in Linux is going to become a thing soon, but the Inkscape practice and some mad googling practice for sure was fun. I hope you enjoy it. 🙂

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper