Sorry .. I wrongly copied code in my earlier email.
Please find plain text below.
1199 static int
1200 receive(void)
1201 {
..
..
1233 snmp_log(LOG_INFO, "Reconfiguring daemon\n");
1234 /* Stop and restart logging. This allows logfiles to be
1235 rotated etc. */
1236 netsnmp_logging_restart();
1237 snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n",
1238 netsnmp_get_version());
1239 update_config();
1240 send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3);
..
..
}
In the above piece of code:
1. In line 1237, log points to "NET-SNMP version 5.7.3 restarted", but in
actual, it is net-snmp logger that gets restarted here.
Hence the above message needs to be changed accordingly so that it doesn't
annoy customers !!
Am I right ?
1. In line 1240, why a trap is being sent just for a snmp logging restart ?
Is this trap really need here as snmp process is not actually getting restarted
?
Can this line be commented out ? And what is the impact if so.
Thanks,
Kiran
From: Kiran Kumar Pamula -X (kpamula - HCL TECHNOLOGIES LIMITED at Cisco)
Sent: 05 September 2019 17:04
To: [email protected]
Cc: Naresh Pindukuru -X (narpindu - HCL TECHNOLOGIES LIMITED at Cisco)
<[email protected]>; Appandainathan Ayyannan -X (aayyanna - HCL TECHNOLOGIES
LIMITED at Cisco) <[email protected]>
Subject: Some general questions on netsnmp_logging_restart
Hi Experts,
Could you please help me with below questions:
File:
net-snmp<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/>/5.7.3-r5.0<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/>/net-snmp-5.7.3<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/>/agent<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/>/snmpd.c<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c>
1232
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1232>
reconfig<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#reconfig>
= 0;
1233
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1233>
snmp_log<https://wwwin-opengrok.cisco.com/643c/s?defs=snmp_log>(LOG_INFO<https://wwwin-opengrok.cisco.com/643c/s?defs=LOG_INFO>,
"Reconfiguring daemon\n");
1234
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1234>
/* Stop and restart logging. This allows logfiles to be
1235
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1235>
rotated etc. */
1236
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1236>
netsnmp_logging_restart<https://wwwin-opengrok.cisco.com/643c/s?defs=netsnmp_logging_restart>();
1237
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1237>
snmp_log<https://wwwin-opengrok.cisco.com/643c/s?defs=snmp_log>(LOG_INFO<https://wwwin-opengrok.cisco.com/643c/s?defs=LOG_INFO>,
"NET-SNMP version %s restarted\n",
1238
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1238>
netsnmp_get_version<https://wwwin-opengrok.cisco.com/643c/s?defs=netsnmp_get_version>());
1239
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1239>
update_config<https://wwwin-opengrok.cisco.com/643c/s?defs=update_config>();
1240
<https://wwwin-opengrok.cisco.com/643c/xref/obj/vendor-built/tmp/work/x86_64-montavista-linux/net-snmp/5.7.3-r5.0/net-snmp-5.7.3/agent/snmpd.c#1240>
send_easy_trap<https://wwwin-opengrok.cisco.com/643c/s?defs=send_easy_trap>(SNMP_TRAP_ENTERPRISESPECIFIC<https://wwwin-opengrok.cisco.com/643c/s?defs=SNMP_TRAP_ENTERPRISESPECIFIC>,
3);
In the above piece of code:
1. In line 1237, log points to "NET-SNMP version 5.7.3 restarted", but in
actual, it is net-snmp logger that gets restarted here.
Hence the above message needs to be changed accordingly so that it doesn't
annoy customers !!
Am I right ?
1. In line 1240, why a trap is being sent just for a snmp logging restart ?
Is this trap really need here as snmp process is not actually getting restarted
?
Can this line be commented out ? And what is the impact if so.
Thanks,
Kiran
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users