LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-26-2018, 11:53 AM   #1
venugost
LQ Newbie
 
Registered: Jun 2018
Posts: 1

Rep: Reputation: Disabled
Difference between htop and free -m


Hi Team,

Could you please help me to understand what is the exact difference between htop and free -m command.

when i give free -m command, i'm getting the below.
total used free shared buffers cache

when i give htop, it will all the process running and memory details.
mem[||||||||||************** used memory/total memory]

When compared both the results, i could see the total memory both are same, but the used memory are totally different.

For example, in free -m, i could see total - 94 used-94 free 114 MB
but in htop 14GB/94GB.

Kindly help me how to check the exact ram size used.
 
Old 06-26-2018, 12:06 PM   #2
Honest Abe
Member
 
Registered: May 2018
Distribution: CentOS 7, OpenSUSE 15
Posts: 420
Blog Entries: 1

Rep: Reputation: 202Reputation: 202Reputation: 202
Always post the outputs enclosed in code tags.
(click advanced when you reply and hit the #)

Have you already checked this and this ?

This is a pretty common question that has been asked countless times on every linux forum/tech sites. So feel free to ask your favourite browser.

Last edited by Honest Abe; 06-26-2018 at 12:07 PM.
 
Old 06-26-2018, 06:24 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by venugost View Post
Kindly help me how to check the exact ram size used.
There is no consensus on what "used" RAM means - or how it is apportioned nor displayed. Even the kernel devs argued about it for quite a while when introducing the concept of proportional accounting of shared library objects currently loaded into memory.

Just accept that there is no "exact ram size used". The two referenced links should help - just pick a metric you are happy with. If you want some idea of the complexities involved, run this command - and that is just for the "cat" command itself.
Code:
cat /proc/self/smaps
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Does htop and free -m show ballooned memory? samanka80 Linux - Server 7 08-27-2013 03:35 AM
free, top and htop show different memory usage wulp Linux - General 2 07-13-2011 12:22 AM
[SOLVED] Difference in free space HiredGun555 Linux - General 3 11-22-2010 01:50 AM
Htop vs 'top' vs 'free' disparity schachwizard Ubuntu 2 09-22-2010 04:33 PM
Difference between Retail and Free SuSe Anthony1uk Linux - Newbie 3 02-23-2005 09:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration