LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Free command conflict (https://www.linuxquestions.org/questions/linux-newbie-8/free-command-conflict-635696/)

cghcgh 04-16-2008 04:45 AM

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?

acid_kewpie 04-16-2008 05:33 AM

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

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.

cghcgh 04-16-2008 11:48 PM

haha...it's so misleading. well, guess i will stick to free -m instead. :)


All times are GMT -5. The time now is 09:11 PM.