Narayana Smaranas,

I have a simple setup of a Ucd-Snmp Master (4.2.3)
agent on a linux box and a third-party Snmp manager on
another system. I have Snmp v3 support enabled. I have
registered a subagent that implements a set of SNMP
objects, with the Master agent.

On UCD system (4.2.3), when I try to set the locally
implemented object, the operation is successful for
valid data. The set operation adds a new user entry
into the snmpd.conf file and internally sends a SIGHUP
to the UCD Master Agent. Even other GET* queries to
the agent goes through successfully immediately after
the SET operation.

But on a Net-SNMP system (5.1.4), for the same
sub-agent code, the behaviour is different. Any GET*
queries to the subagent, immediately after the SET
operation, fails returning different error codes, for
some duration of time. After sometime, the same
queries succeed. This failure, as I observed through
strace utility, is proportional to the number of users
in the snmpd.conf file. More the number of users in
the "snmpd.conf", more the time taken by the Master
Agent for Agentx initialization upon receiving the
SIGHUP signal. The error codes returned are also
different. Sometimes I get a "GEN Error" and sometimes
"Empty data". Below I paste the strace log, when there
were 10 users in the snmpd.conf file. It can be
observed that after the printing the string "Turning
on the Agentx support", the snmpd process is held up
for 15 seconds before proceeding further.

----------Strace-log--------------------------


06:33:25 --- SIGHUP (Hangup) @ 0 (0) ---
06:33:25 rt_sigaction(SIGHUP, {0x804a1e0, [HUP],
SA_RESTORER|SA_RESTART, 0x4028b028}, {0x804a1e0,
[HUP], SA_RESTORER|SA_RESTART, 0x4028b028}, 8) = 0
06:33:25 sigreturn() = ? (mask now
[])
06:33:25 write(3, "Reconfiguring daemon\n", 21) = 21
06:33:25 write(3, "NET-SNMP version 5.1.4
restarted"..., 33) = 33
06:33:25 open("/usr/etc/snmp/snmpd.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 open("/usr/etc/snmp/snmpd.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("/usr/share/snmp/snmpd.conf", O_RDONLY)
= -1 ENOENT (No such file or directory)
06:33:25 open("/usr/share/snmp/snmpd.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("/usr/lib/snmp/snmpd.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 open("/usr/lib/snmp/snmpd.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("//.snmp/snmpd.conf", O_RDONLY) = -1
ENOENT (No such file or directory)
06:33:25 open("//.snmp/snmpd.local.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 stat64("/var/ucd-snmp/snmpd.0.conf",
0xbfffdc70) = -1 ENOENT (No such file or directory)
06:33:25 open("/var/ucd-snmp/snmpd.conf", O_RDONLY) =
11
06:33:25 fstat64(11, {st_dev=makedev(0, 7),
st_ino=2707, st_mode=S_IFREG|0600, st_nlink=1,
st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0,
st_size=680, st_atime=2007/05/07-06:32:52,
st_mtime=2004/01/01-08:00:54,
st_ctime=2004/01/01-08:00:54}) = 0
06:33:25 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40398000
06:33:25 read(11, "#\n# net-snmp (or ucd-snmp)
persi"..., 4096) = 680
06:33:25 read(11, "", 4096) = 0
06:33:25 close(11) = 0
06:33:25 munmap(0x40398000, 4096) = 0
06:33:25 open("/var/ucd-snmp/snmpd.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("/usr/etc/snmp/snmp.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 open("/usr/etc/snmp/snmp.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("/usr/share/snmp/snmp.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 open("/usr/share/snmp/snmp.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("/usr/lib/snmp/snmp.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 open("/usr/lib/snmp/snmp.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 open("//.snmp/snmp.conf", O_RDONLY) = -1
ENOENT (No such file or directory)
06:33:25 open("//.snmp/snmp.local.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 stat64("/var/ucd-snmp/snmp.0.conf",
0xbfffdc70) = -1 ENOENT (No such file or directory)
06:33:25 open("/var/ucd-snmp/snmp.conf", O_RDONLY) =
-1 ENOENT (No such file or directory)
06:33:25 open("/var/ucd-snmp/snmp.local.conf",
O_RDONLY) = -1 ENOENT (No such file or directory)
06:33:25 stat64("/usr/local/etc/snmpd.conf",
{st_dev=makedev(0, 7), st_ino=111579,
st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0,
st_blksize=4096, st_blocks=0, st_size=2667,
st_atime=2007/05/07-06:33:25,
st_mtime=2007/05/07-06:33:25,
st_ctime=2007/05/07-06:33:25}) = 0
06:33:25 open("/usr/local/etc/snmpd.conf", O_RDONLY) =
11
06:33:25 fstat64(11, {st_dev=makedev(0, 7),
st_ino=111579, st_mode=S_IFREG|0644, st_nlink=1,
st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0,
st_size=2667, st_atime=2007/05/07-06:33:25,
st_mtime=2007/05/07-06:33:25,
st_ctime=2007/05/07-06:33:25}) = 0
06:33:25 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40398000
06:33:25 read(11, "# The details of this file are
n"..., 4096) = 2667
06:33:25 write(3, "Turning on AgentX master
support"..., 34) = 34
06:33:40 read(11, "", 4096) = 0
06:33:40 close(11) = 0
06:33:40 munmap(0x40398000, 4096) = 0
06:33:40 times({tms_utime=3871, tms_stime=124,
tms_cutime=0, tms_cstime=0}) = 23202580
06:33:40 times({tms_utime=3871, tms_stime=124,
tms_cutime=0, tms_cstime=0}) = 23202581
06:33:40 gettimeofday({1178519620, 21733}, NULL) = 0

-----------Strace-log---------------------------

The behaviour on a UCD system (4.2.3) was different.
None of the GET* queries failed, even though the
strace showed that the Agentx initialization took
almost the same time as Net-Snmp system.

Why is this behaviour different between Ucd-SNMP and
Net-Snmp ? Can somebody respond to these queries at
the earliest.

Narayana Smaranas,
Venkatesha.


Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Click here: http://in.messenger.yahoo.com/webmessengerpromo.php

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders