LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2008, 05:45 AM   #1
cghcgh
Member
 
Registered: Mar 2008
Posts: 69

Rep: Reputation: 15
Free command conflict


Hi,

I was checking out the free command which shows the physical memory of linux.

# free -m
total used free shared buffers cached
Mem: 3945 784 3160 0 64 393
# free -g
total used free shared buffers cached
Mem: 3 0 3 0 0 0


# free -m
total used free shared buffers cached
Mem: 2009 1469 540 0 147 305
# free -g
total used free shared buffers cached
Mem: 1 1 0 0 0 0



Why is that such a huge different when i choose the megabyte and gigabyte view?
 
Old 04-16-2008, 06:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
because there's a big difference between a gigabyte and a megabyte... abuot 1024 times..

the gigabyte number is in whole gigabytes, not the nearest, so 2009 meg is 1.9something gig, so truncated to 1. it would only read 2 if it was 2048 meg or more.
 
Old 04-17-2008, 12:48 AM   #3
cghcgh
Member
 
Registered: Mar 2008
Posts: 69

Original Poster
Rep: Reputation: 15
haha...it's so misleading. well, guess i will stick to free -m instead.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Need Command to see free spaces shipon_97 Linux - Newbie 4 11-24-2006 09:50 AM
system buffer in free command LinuxLover Linux - General 2 06-30-2006 02:04 AM
What does the output of the 'free' command mean? kau2 Linux - Newbie 3 05-21-2004 07:58 PM
Shell command to see free space linksocc Linux - Newbie 4 09-27-2003 12:57 AM
FREE Coloured custom command prompts!!!!! =) Hegemon Linux - General 8 01-20-2003 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration