Correct way of stopping snmpd
Hi All, Kindly confirm that 'kill -9' is valid way to stop snmpd. I am writing service script for systemctl to stop snmpd and would like to understand correct way of stopping the daemon. According to Source code agent/snmpd.c , SIGTERM (kill -9) , SIGINT (ctl+c) are for snmpd shutdown. Thanks, Pushpa.T ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Correct way of stopping snmpd
You may take a look at https://src.fedoraproject.org/rpms/net-snmp/blob/rawhide/f/snmpd.service for a working example in Fedora/RHEL. Best regards Josef Ridky Senior Software Engineer Core Services Team Red Hat Czech, s.r.o. On Tue, May 21, 2024 at 10:29 AM Pushpa Thimmaiah < pushpa.thimma...@gmail.com> wrote: > Hi All, > > Kindly confirm that 'kill -9' is valid way to stop snmpd. > > I am writing service script for systemctl to stop snmpd and would like to > understand correct way of stopping the daemon. > According to Source code agent/snmpd.c , SIGTERM (kill -9) , SIGINT > (ctl+c) are for snmpd shutdown. > > > Thanks, > Pushpa.T > > > ___ > Net-snmp-coders mailing list > Net-snmp-coders@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Correct way of stopping snmpd
Den 21-05-2024 kl. 10:30 skrev Pushpa Thimmaiah: Hi All, Kindly confirm that 'kill -9' is valid way to stop snmpd. I am writing service script for systemctl to stop snmpd and would like to understand correct way of stopping the daemon. According to Source code agent/snmpd.c , SIGTERM (kill -9) , SIGINT (ctl+c) are for snmpd shutdown. SIGTERM is not kill -9, it is kill -16. kill -9 is SIGKILL /Niels -- Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net The purpose of computing is insight, not numbers -- R W Hamming -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Getting listening port number while processing request
On Mon, 13 May 2024 at 14:26, Bart Van Assche wrote: > On 5/13/24 03:05, Teus Benschop wrote: > > > The patches work for the TCP domain, and that certainly is sufficient for > us, and we are happy. > > Would it also be helpful if I would create similar patches for the *UDP* > domain? > > Generalizing this work by adding UDP support for this mechanism sounds > good to me. > > > Hello Bart, Thank you for the go-ahead. I went ahead and created the patch for the UDP domain. In line with the previous patch where you had added support for IPv6, I have added that support to this patch too. It was tested and works fine when the snmpd listens on udp, and when it listens on udp6. The patch is attached to this email. If it could be merged into the source code, we would be so grateful. Thank you, Teus Benschop local_udp_port.patch Description: Binary data ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Correct way of stopping snmpd
Den 21-05-2024 kl. 13:34 skrev Niels Baggesen: SIGTERM is not kill -9, it is kill -16. kill -9 is SIGKILL Whoops, minor typo, SIGTERM is 15, not 16. Thanks to jhawk! /Niels -- Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net The purpose of computing is insight, not numbers -- R W Hamming -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Getting listening port number while processing request
On 5/21/24 5:14 AM, Teus Benschop wrote: Thank you for the go-ahead. I went ahead and created the patch for the UDP domain. In line with the previous patch where you had added support for IPv6, I have added that support to this patch too. It was tested and works fine when the snmpd listens on udp, and when it listens on udp6. The patch is attached to this email. If it could be merged into the source code, we would be so grateful. The attached patch in combination with a patch that reduces code duplication have been applied. Please retest. Thanks, Bart. ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: Correct way of stopping snmpd
Thank you Josef Ridky and Niels Baggesen On Tue, May 21, 2024 at 10:20 PM Niels Baggesen wrote: > Den 21-05-2024 kl. 13:34 skrev Niels Baggesen: > > > SIGTERM is not kill -9, it is kill -16. kill -9 is SIGKILL > > Whoops, minor typo, SIGTERM is 15, not 16. Thanks to jhawk! > > /Niels > > -- > Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net > The purpose of computing is insight, not numbers -- R W Hamming > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > > ___ > Net-snmp-coders mailing list > Net-snmp-coders@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders