?
Solved

How to read htop graph

Posted on 2010-01-11
6
Medium Priority
?
3,627 Views
Last Modified: 2013-12-16
I don't understand how to read the htop graph. What's the difference between the green, blue, yellow, and red (not shown) bars?
1-11-2010-1-41-24-PM.png
0
Comment
Question by:DrDamnit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Accepted Solution

by:
getBman earned 1000 total points
ID: 26286074
Hello,

The colors mean different things depending on the usage bar you are reading.

CPU usage bar:
Blue = low-priority
Green = normal
Red = kernel

Memory bar:
Green = used
Blue = buffers
Yellow = cache

Swap bar:      
Red = used

After executing htop - you can hit your F1 Key to get additional help for colors and keyboard shortcuts.

-b@
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 26286329
So the bar is subdivided out into various categories of usage. But the overall amount is the actual, in use amount, right?
0
 

Expert Comment

by:getBman
ID: 26286658
Correct,

On my system for example "top" shows me I have about 4G total Memory, 3.2G Used which would be right around 83% total used.

When I run Htop the memory graph shows me 3 Green Bars, 2 Blue and the rest Yellow.

The combined total of the bars is approximately 83%.

So the combined bars regardless of colors should indicate the total memory used.

The beginning "[" would then be 0% and ending "]" would indicate 100%

Hope this helps,
-b@
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Assisted Solution

by:Monis Monther
Monis Monther earned 1000 total points
ID: 26286920
No exactly

The yellow which consumes most of the bar is Cached, this is a feature in the Linux kernel

Under Linux any unused memory is wasted resource, so it tries to make use of it and put this memory in a buffer for faster access when needed, so you can consider it unused because when you open a app it will take out from this buffer cache first.

You can flush it from a setting in /proc , but I dont really remember the parameter for it now and you dont need to do that , its better functioning this way.

Same goes for the blue (buffers or kernel bufferes0

So the Green is what is actually used and is the number that you find at the end of the bar

Hope this helps
0
 

Expert Comment

by:getBman
ID: 26286943
Thank you small_student
0
 
LVL 14

Expert Comment

by:Monis Monther
ID: 26286964
You can also double check the exact amount of used memory by running the free command

one my servers shows the following

                     total       used       free     shared    buffers     cached
Mem:        515492     372332     143160          0      60312     248732
-/+ buffers/cache:      63288     452204
Swap:      2096472         72    2096400


So as you can see in the second line the used memory is 63288 which is 63MB this is the number that I get in the htop bar at the end which is what exactly is used

In your case your bar shows 323, this is what is used
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question