The current net-snmp series (<=5.09) doesn't correctly parse the process information under Linux; processes that are swapped out don't register as running, so 'proc' statements in snmpd.conf fail. This patch (by a net-snmp developer) changes it to use /proc/XXXX/status instead of (the current) /proc/XXXX/cmdline. This was fixed in CVS nine months ago but for some reason hasn't been picked up in the last couple of releases. NOTE: for the last couple of releases, 'proc' has sort-of worked for non-swapped processes, but only if you included the full path. After this fix, it will go back to just wanting the process name (without the path). This is how it's supposed to work (and, indeed, the way it works on Solaris). Reproducible: Always Steps to Reproduce: 1. run 'ps aux' and find a process that's swapped out - it'll be in brackets. kjournald usually is. 2. add 'proc kjournald' (or whatever) to your snmpd.conf & restart snmpd. 3. run "snmpwalk -v 1 -c <community name> <hostname> enterprises" -- prErrorFlag will be set for the proccess in question, even tho it is, indeed, running. Actual Results: "No kjournald process running." Expected Results: no error flag. Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r6, 2.4.20-gentoo-r6) ================================================================= System uname: 2.4.20-gentoo-r6 i686 Celeron (Mendocino) Gentoo Base System version 1.4.3.11 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.2 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=i686 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs sandbox ccache" GENTOO_MIRRORS="http://moya.advisortech.com/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://gentoo.mirrors.pair.com/ http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://moya.advisortech.com/gentoo-portage" USE="x86 oss apm avi crypt encode foomaticdb gif imlib jpeg libg++ libwww mad mikmod motif mpeg ncurses oggvorbis opengl pdflib png quicktime sdl spell svga truetype xml2 xmms xv zlib gdbm berkdb slang readline tcpd pam ssl perl python -kde -qt -arts -nls -gnome -gtk -X -gpm -tcltk -java -cups maildir"
Created attachment 20612 [details, diff] small patch to net-snmp-5.0.9-r1 to pull in the patch to proc.c
Created attachment 20613 [details, diff] the patch to proc.c, from http://sourceforge.net/mailarchive/message.php?msg_id=3751940
Had to pull the patch from net-snmp cvs (formatting was a bit off), but otherwise this is in 5.0.9-r3.