Subject: Re: vmstat and netstat....
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 03/27/2006 07:57:14
Pavel Cahyna wrote:
> On Mon, Mar 27, 2006 at 10:14:53AM +0200, Manuel Bouyer wrote:
>   
>> On Sun, Mar 26, 2006 at 11:16:37PM -0800, Garrett D'Amore wrote:
>>     
>>> It was recently pointed out that a few commands (vmstat, netstat)
>>> require a kernel file (/netbsd) in the root filesystem in order to
>>> provide, for example, accurate statistics.
>>>       
>> Are you sure ? Can you give examples ? AFAIK these commands uses
>> sysctl to get the statistics on live systems, /netbsd (or the kernel
>> binary specified by -N) is used only when working on crashdumps.
>>     
>
> Even in cases where they don't use sysctl, they are able to use
> /dev/ksyms instead of /netbsd.
>
> # rm /netbsd
> # vmstat -m
> <sensible output>
> # mv /dev/ksyms /dev/ksyms.bak
> # vmstat -m                    
> vmstat: kvm_openfiles: /netbsd: No such file or directory
>
> Pavel
>   

Hmm... so may be my problem was that /netbsd was out of date wrt the
binary I was running.

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191