From: Bert D. <dri...@pl...> - 2000-10-24 21:33:51
|
On Tue, 24 Oct 2000, Michael J. Slifcak wrote: > I see these errors (in no particular order) when I run > the agent as a non-privileged user on FreeBSD 3.4-STABLE : [snip] > auto_nlist failed on boottime at location 0 I think Romain was not referring to auto_nlist failures, but rather to an issue where kvm_read would try to read from unmapped kernel memory (which I think the Bad Address message refers to). Probably a pointer into never-never land... > > Anyone out there working with FreeBSD 3.x or later? I was getting > > the following messages in snmpd.log everytime I snmpwalk'd a > > FreeBSD 3.4 machine: > > TCP_Count_Connections - inpcb: Bad address > > kvm_read(*, 11bb, 0xbfbfaa84, 96) = 0: kvm_read: Bad address > > > > I borrowed sysctl()-based code from netstat to get around this, but > > I'm not convinced that I've done the Right Thing. That code looks okay to me (I must admit I haven't delved real deep into this particular bit of code, as I don't run 3.4 anywhere and didn't run into the issue on 4.0). In general, kvm access should be replaced with sysctl where possible (to avoid requiring root access is one good reason, in addition, sysctl is a much cleaner interface, with fewer opportunities to go awry, because sysctl guarantees the data won't go foom while you're reading it). The mibJJ code will have less kvm and more sysctl, at least for the BSD's (did anyone got a chance to look at the diffs for mibJJ and *BSD I sent, b.t.w.?) Of course, in practice the sysctl interface isn't as well documented as it might have been, but hey, it's a start... Cheers, -- Bert Bert Driehuis -- dri...@pl... -- +31-20-3116119 If the only tool you've got is an axe, every problem looks like fun! |