LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-05-2006, 08:42 PM   #1
stny
LQ Newbie
 
Registered: Jan 2006
Location: Hong Kong
Distribution: Fedora 4
Posts: 22

Rep: Reputation: 15
How to get the memory using status ?


Like "statfs" to get the infomation about the file system, have any command to get information about the memory information or using status ?

Thanks.
 
Old 09-05-2006, 10:28 PM   #2
randyding
Member
 
Registered: May 2004
Posts: 552

Rep: Reputation: 31
try "cat /proc/meminfo"
 
Old 09-07-2006, 08:34 PM   #3
stny
LQ Newbie
 
Registered: Jan 2006
Location: Hong Kong
Distribution: Fedora 4
Posts: 22

Original Poster
Rep: Reputation: 15
I got another command can show the memory using "free"
but the memory details display from these command have some different.

which is the memory using of the system ?


Code:
[test@localhost ~]$ free
             total       used       free     shared    buffers     cached
Mem:        255636     245740       9896          0       4740      70984
-/+ buffers/cache:     170016      85620
Swap:            0          0          0

[test@localhost ~]$ cat /proc/meminfo
MemTotal:       255636 kB
MemFree:          9912 kB
Buffers:          4756 kB
Cached:          71040 kB
SwapCached:          0 kB
Active:         184188 kB
Inactive:        15252 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       255636 kB
LowFree:          9912 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:             132 kB
Writeback:           0 kB
Mapped:         172080 kB
Slab:            13380 kB
CommitLimit:    127816 kB
Committed_AS:   593284 kB
PageTables:       3256 kB
VmallocTotal:   770040 kB
VmallocUsed:     31568 kB
VmallocChunk:   734708 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB

Thank you your help.

Last edited by stny; 09-07-2006 at 09:16 PM.
 
Old 09-09-2006, 03:48 AM   #4
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
On Linux you may use sysinfo(2) as well.
 
Old 09-09-2006, 11:47 AM   #5
skiing
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
studying........
 
Old 09-11-2006, 08:40 PM   #6
stny
LQ Newbie
 
Registered: Jan 2006
Location: Hong Kong
Distribution: Fedora 4
Posts: 22

Original Poster
Rep: Reputation: 15
Thank a lot

Can i ask one more ?
How to get the current CPU using ?

Thanks
 
  


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
Retrieval of memory status of a computer thirst Programming 2 06-05-2006 08:48 AM
Retrieval of memory status of a computer thirst Programming 1 06-02-2006 04:25 AM
Memory status cooldudeguy General 1 12-06-2004 12:25 PM
Memory status console on X-Windows? piglingz Linux - Software 1 04-06-2003 09:12 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:43 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