LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-26-2006, 05:12 AM   #1
Deelk
Member
 
Registered: Mar 2006
Posts: 71

Rep: Reputation: 15
RAM usage


Hi,

As you already know,linux takes alot of RAM,but it doesn't need it.So it uses like 500 MB RAM,but when an other app needs it,it gives a part of it to the new app launched.People say that linux does this because it is better and faster.Let's get to my question.When I type top in the terminal it shows me the memory usage with the ''unnecessary'' RAM usage included.How can I see how much RAM it really uses,so without the ''unnecessary'' RAM usage?So how can I see how much RAM it really uses ffor the running processes?I hope you'll understand my question,I couldn't explain it really good.

Thanx in advance
 
Old 03-26-2006, 05:35 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Code:
$ free -m
           total       used       free     shared    buffers     cached
Mem:        1009        202        807          0         21         89
-/+ buffers/cache:       92        917
Swap:        486          0        486
The line in bold shows how much is actively being used by programs currently
 
Old 03-26-2006, 06:10 AM   #3
Deelk
Member
 
Registered: Mar 2006
Posts: 71

Original Poster
Rep: Reputation: 15
Thanx.Why does it say that I have 694 MB total RAM,while I have 704 MB RAM in my motherboard?

Last edited by Deelk; 03-26-2006 at 06:11 AM.
 
Old 03-26-2006, 06:16 AM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Some of it is used for the kernel and isn't accessible by user space programs
 
Old 03-26-2006, 06:33 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Deelk, perhaps what you are looking for is the RES size from top - see man top.
 
Old 03-26-2006, 07:46 AM   #6
Deelk
Member
 
Registered: Mar 2006
Posts: 71

Original Poster
Rep: Reputation: 15
phil.d.g:Thanx

syg00:I've already found it.

I have a little question,but I don't think I have to open a new thread just for that.So here it goes.How can I open a file via the terminal?I want to open an avi file in the folder /home/admin/Desktop/goran/

thanx
 
Old 03-26-2006, 08:18 AM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Well you launch the app that you use to "view" that file and normally pass the filename as an argument, for example I would use mplayer to watch videos so:
Code:
$ mplayer /home/admin/Desktop/goran/file.avi
If I were viewing a text file then I would use vim like this:
Code:
$ vim somefile.txt
 
Old 03-26-2006, 08:34 AM   #8
Deelk
Member
 
Registered: Mar 2006
Posts: 71

Original Poster
Rep: Reputation: 15
Thank you very much,it works
 
Old 03-26-2006, 05:31 PM   #9
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
just a note.
even at this the stats given for RAM usage on Linux are basically useless.
rss for instance multi-counts the shared shared pages common to many other apps etc.

moving into the future thankfully the 2.6.16 kernel adds new reporting and i'm sure apps to parse this won't be far behind.

this will hopefully allow us all to trim some of the fat.
 
Old 03-26-2006, 09:08 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Quote:
Originally Posted by foo_bar_foo
moving into the future thankfully the 2.6.16 kernel adds new reporting
Got a reference I can go look at ???
 
Old 03-27-2006, 01:54 PM   #11
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
you can see here (search the page for smaps)
http://tonnikala.net/linux.php?kerne...ux26&type=full
them working on it
its called smaps /proc/pid/smaps
obviously it ain't right yet from the banter but at least they are trying

also found this
http://bmaurer.blogspot.com/2006/03/...ith-smaps.html

also appears reporting called numa_maps as well
 
Old 03-27-2006, 03:03 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Cheers ...
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RAM usage question. 99%? TheVrolok Linux - Newbie 2 11-28-2005 08:49 PM
RAM/SWAP usage ganja_guru Linux - Software 13 12-29-2004 03:17 AM
Huge RAM usage? RTT Slackware 4 11-28-2003 03:51 PM
RAM usage Serena Linux - General 1 08-12-2003 10:50 PM
Average RAM usage... KevStA Linux - Newbie 7 05-31-2002 04:58 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration