LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How to get the memory using status ? (https://www.linuxquestions.org/questions/programming-9/how-to-get-the-memory-using-status-480768/)

stny 09-05-2006 08:42 PM

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.

randyding 09-05-2006 10:28 PM

try "cat /proc/meminfo"

stny 09-07-2006 08:34 PM

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. :)

primo 09-09-2006 03:48 AM

On Linux you may use sysinfo(2) as well.

skiing 09-09-2006 11:47 AM

studying........:)

stny 09-11-2006 08:40 PM

Thank a lot :)

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

Thanks :)


All times are GMT -5. The time now is 06:18 PM.