Skip to contentSkip to conversation

Size of /proc/kcore growing over time ?

DISCUSSION Martin.Knoblauch 2 participants 3 messages May 11, 2001 – May 14, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

is it normal that the size of /proc/kcore grows over time? Directly
after a boot it has the size of the physical memory. Over time it seems to grow slightly. In about a day it went from 192 MB to about 203 MB. This is 2.4.4-ac6 running on a Toshiba Notebook.

I ask, because I thought the size of kproc could be used to determine
the amount of physical memory. If this assumption is wrong, is there another way to achive the goal?

Happy weekend
Martin

Signature · 5 lines
------------------------------------------------------------------
Martin Knoblauch         |    email:  [email protected]
TeraPort GmbH            |    Phone:  +49-89-510857-309
IT Services              |    Fax:    +49-89-510857-111
http://www.teraport.de   |    Mobile: +49-170-4904759

begin:vcard
n:Knoblauch;Martin
tel;cell:+49-170-4904759 tel;fax:+49-89-510857-111 tel;work:+49-89-510857-309
x-mozilla-html:FALSE
url:http://www.teraport.de
org:TeraPort GmbH;IT-Services
adr:;;Garmischer Straße 4;München;Bayern;D-80339;Germany version:2.1 email;internet:[email protected] title:Senior System Engineer x-mozilla-cpt:;32160
fn:Martin Knoblauch
end:vcard

#1 lore raw
Quoted 5 lines · On 05.11 Martin.Knoblauch wrote:

I ask, because I thought the size of kproc could be used to determine
the amount of physical memory. If this assumption is wrong, is there another way to achive the goal?

#include <sys/sysinfo.h> // for get_phys_pages()
#include <unistd.h> // for getpagesize()

ram = get_phys_pages()*getpagesize();

Signature · 4 lines
J.A. Magallon                           #  Let the source be with you...        
mailto:[email protected]
Linux Mandrake release 8.1 (Cooker) for i586
Linux werewolf 2.4.4-ac6 #1 SMP Wed May 9 14:28:00 CEST 2001 i686
#2 lore raw
In reply to Martin.Knoblauch
Quoted 8 lines · J . A . Magallon
Quoted 5 lines · On 05.11 Martin.Knoblauch wrote:

I ask, because I thought the size of kproc could be used to determine
the amount of physical memory. If this assumption is wrong, is there another way to achive the goal?

Quoted 5 lines

#include <sys/sysinfo.h> // for get_phys_pages()
#include <unistd.h> // for getpagesize()

ram = get_phys_pages()*getpagesize();

Close, but not there :-) What I want is the total physical memory in
the system. Above seems to report only the physical pages available to the kernel.

Thanks anyway
Martin

Signature · 5 lines
------------------------------------------------------------------
Martin Knoblauch         |    email:  [email protected]
TeraPort GmbH            |    Phone:  +49-89-510857-309
IT Services              |    Fax:    +49-89-510857-111
http://www.teraport.de   |    Mobile: +49-170-4904759

begin:vcard
n:Knoblauch;Martin
tel;cell:+49-170-4904759 tel;fax:+49-89-510857-111 tel;work:+49-89-510857-309
x-mozilla-html:FALSE
url:http://www.teraport.de
org:TeraPort GmbH;IT-Services
adr:;;Garmischer Straße 4;München;Bayern;D-80339;Germany version:2.1 email;internet:[email protected] title:Senior System Engineer x-mozilla-cpt:;32160
fn:Martin Knoblauch
end:vcard