Subject: Re: vmstat and netstat....
To: Garrett D'Amore <email@example.com>
From: Garrett D'Amore <firstname.lastname@example.org>
Date: 03/27/2006 08:42:15
Garrett D'Amore wrote:
> Manuel Bouyer wrote:
>> On Mon, Mar 27, 2006 at 08:18:20AM -0800, Garrett D'Amore wrote:
>>> But now looking, it looks like the attempt to open /dev/ksyms on evbmips
>>> at least returned ENXIO. So maybe I need to enable ksyms.
>>> By the way, ksyms is *also* a big size growth (though not as much as a
>>> whole kernel). I'd rather have a sysctl consumer than have to allocate
>>> space in my kernel for a kernel symbol table. (Again, this is because
>>> I'm operating in situations with tight ram constraints -- 8MB ram, and
>>> similar sized flash.)
>> Maybe it would be possible to strip the kernel to keep only symbols
>> that matters ? For libkvm, all function names could probably be stripped
>> at last.
> It seems like it would probably be simpler to just add some sysctls and
> make vmstat use them.
> Someone mentioned that netstat already uses sysctls. I've not check
> that myself yet.
Huh. It looks like netstat uses sysctl by default, but *errs out* if
kvm_openfiles fails, even in this case, which sort of (IMO) defeats one
of the major benefits of using sysctl.
Maybe the code around line 151 in netstat/main.c needs to be
conditionalized based upon the use_sysctl value? :-)
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134 Fax: 951 325-2191