Re: Getting the page size of currently running kernel

2005-02-19 Thread Scott Bronson
On Saturday 19 February 2005 19:28, Roland Dreier wrote: > I'm not sure exactly how to call it from perl, but from C one can use > sysconf(3) like: > > page_size = sysconf(_SC_PAGESIZE); > > (one can also use getpagesize(2) to do exactly the same thing) And I was going nuts looking all over /proc

Re: Getting the page size of currently running kernel

2005-02-19 Thread Roland Dreier
Scott> Is there any way to get a running kernel to tell you the Scott> size of its pages? Why: I'm writing a quick Perl hack to Scott> monitor the memory usage of the TCP stack over time. Easy Scott> enough: /proc/net/sockstat gives the current value of Scott> tcp_memory_alloc

Re: Getting the page size of currently running kernel

2005-02-19 Thread Jan Knutar
On Sunday 20 February 2005 05:01, Scott Bronson wrote: > Is there any way to get a running kernel to tell you the size of its pages? > > Why: I'm writing a quick Perl hack to monitor the memory usage of the TCP > stack over time. Easy enough: /proc/net/sockstat gives the current value of > tcp_

Getting the page size of currently running kernel

2005-02-19 Thread Scott Bronson
Is there any way to get a running kernel to tell you the size of its pages? Why: I'm writing a quick Perl hack to monitor the memory usage of the TCP stack over time. Easy enough: /proc/net/sockstat gives the current value of tcp_memory_allocated. But how do I convert this into bytes? I don't