Subject: Re: when to sysctl and when not to?
To: Andrew Sporner <andy.sporner@networkengines.com>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 06/16/2000 21:38:25
Andrew Sporner wrote:
> So what do I need to get this code in 'current'? Is
> this a patch or will it be committed to the source
> tree?
I'm not quite sure what you mean - at the moment I slowly going through
the kmem grovellers and converting them to use sysctls and removing
setgid kmem from them. I've already changed the current sysctl-users
(ps, top, w, ipcs and nfsstat) to just check memory file and not the
namelist file when deciding to use sysctl or kvm for accessing kernel
data.
Which bit of "code" do you mean?
Simon.
--
>
> -----Original Message-----
> From: Simon Burge [mailto:simonb@netbsd.org]
> Sent: Friday, June 16, 2000 12:45 AM
> To: matthew green
> Cc: tech-kern@netbsd.org
> Subject: Re: when to sysctl and when not to?
>
>
> matthew green wrote:
>
> > There's scope to go even further and use
> >
> > if (memf == NULL || strcmp(memf, _PATH_MEM) == 0)
> >
> >
> > i think this may be going too far.
> >
> >
> > perhaps we could document in the kvm commands that if you do
> > pass a memory file, you want to use kvm-style accesses...
>
> At the moment, there's no documentation in the kvm commands to say that
> they might not use kvm (and most don't mention kvm anyway). There's
> usually words to the effect of "extract default info from /dev/kmem."
>
> Hmm, even that's not right - you need to specify "/dev/mem" and not
> "/dev/kmem" - a quick check shows that most of the grovellers reference
> /dev/kmem and not /dev/mem. Did something change this in the past and
> the man pages not get updated? And what would use /dev/kmem now then
> anyway?
>
> Simon.
>