On 9 November 2011 00:11, Nguyen Dinh Phong <ndph...@yahoo.com> wrote: > The question here is if it's OK to have two traps from the same system with > different timestamp/uptime?
Sure - I don't see why not. > Would it cause any confusion for the trap receiver? That's impossible to answer - you haven't said anything about what trap receiver you are using, or how this processes the incoming traps. If it's trying to correlate information between the various traps received, and doesn't realise that there may be more than one SNMP application running on a single system, then it might indeed get confused. But if the trap receiver is more intelligent than this (and can cope with multiple SNMP engines on the same box), or simpler (and doesn't try to correlate multiple traps at all), then there shouldn't be any problem. > If we have to use one uptime for the trap PDU, which one is correct? Neither one is "correct". The agent uptime is correct for traps sent by the agent, but not for traps sent independently of the agent, The system uptime is not strictly correct for independent traps, but is probably more meaningful than the uptime of the snmptrap command (typically <1s every time). But neither of these would be correct for traps sent by the agent. If you're looking to consolidate the timestamps for all traps, then the simplest approach would probably be to follow Magnus' suggestion of using 'agentxtrap' to send the independent traps rather than 'snmptrap'. Then *all* traps would be generated via the agent, and using the agent uptime would be correct throughout. But it all depends on how the receiver is processing the traps, as to whether these different timestamps make any difference at all. Dave ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders