Re: SNMP and PID file
On 2015-03-26, Alex Naumov alexander_nau...@opensuse.org wrote: # /etc/rc.d/snmpd restart httpd2 (pid 29518) already running Weird. What are the contents of /etc/rc.d/snmpd?
Re: SNMP and PID file
On Fri, Mar 27, 2015 at 9:51 AM, Stuart Henderson s...@spacehopper.org wrote: On 2015-03-26, Alex Naumov alexander_nau...@opensuse.org wrote: # /etc/rc.d/snmpd restart httpd2 (pid 29518) already running Weird. What are the contents of /etc/rc.d/snmpd? #!/bin/sh # # $OpenBSD: snmpd,v 1.1 2011/07/06 18:55:36 robert Exp $ daemon=/usr/sbin/snmpd . /etc/rc.d/rc.subr pexp=snmpd: parent.* rc_cmd $1
Re: SNMP and PID file
On 2015/03/27 12:00, Alex Naumov wrote: On Fri, Mar 27, 2015 at 9:51 AM, Stuart Henderson s...@spacehopper.org wrote: On 2015-03-26, Alex Naumov alexander_nau...@opensuse.org wrote: # /etc/rc.d/snmpd restart httpd2 (pid 29518) already running Weird. What are the contents of /etc/rc.d/snmpd? #!/bin/sh # # $OpenBSD: snmpd,v 1.1 2011/07/06 18:55:36 robert Exp $ daemon=/usr/sbin/snmpd . /etc/rc.d/rc.subr pexp=snmpd: parent.* rc_cmd $1 That's correct...hmm, do you have anything non-standard relating to httpd2 in /etc/rc.conf.local or /etc/rc.conf?
Re: SNMP and PID file
# /etc/rc.d/snmpd restart httpd2 (pid 29518) already running # uname -a OpenBSD name 5.2 GENERIC#278 i386 # ps aux | grep snmpd root 23284 0.0 0.1 556 980 ?? IsWed04PM0:00.00 snmpd: parent (snmpd) _snmpd 28300 0.0 0.1 676 1380 ?? I Wed04PM0:00.55 snmpd: snmp engine (snmpd) root 23789 0.0 0.0 592 4 p0 R+ 6:06PM0:00.00 grep snmpd (ksh) # ls -la /var/run/ total 192 drwxr-xr-x 3 root wheel512 Mar 25 16:59 . drwxr-xr-x 25 root wheel512 Mar 29 2014 .. -rw-r--r-- 1 root wheel 6 Nov 13 08:17 cron.pid -rw-r--r-- 1 root wheel 49152 Nov 13 08:17 dev.db -rw-r--r-- 1 root wheel 9124 Nov 13 08:17 dmesg.boot -rw-r--r-- 1 root wheel 5 Nov 13 08:17 inetd.pid -r--r--r-- 1 root wheel 12460 Nov 13 08:17 ld.so.hints drwxr-xr-x 2 root wheel512 Nov 13 08:17 rc.d -rw--- 1 root wheel 70 Nov 13 08:17 sendmail.pid srw-rw 1 root wheel 0 Mar 25 16:59 snmpd.sock -rw-r--r-- 1 root wheel 5 Nov 13 08:17 sshd.pid -rw-r--r-- 1 root wheel 6 Nov 13 08:17 syslog.pid -rw-rw-r-- 1 root utmp7200 Mar 26 18:04 utmp Please look at first command's output. It looks like a bug or something like this. Of course I can find a pid and than kill this process, but... On Wed, Mar 25, 2015 at 6:09 PM, Joshua Smith jsm...@mail.wvnet.edu wrote: /etc/rc.d/snmpd restart always worked for me to restart snmpd. On Wed, Mar 25, 2015 at 06:02:30PM +0100, Alex Naumov wrote: Hello, I just want to ask about snmpd(8). As I can see, snmpd don't create pid file in /var/run directory. Is it correct? How to reboot this daemon? There is just sock-file. Thank you, Alex -- Joshua Smith Montani Semper Liberi
Re: SNMP and PID file
You are running a pretty old ( 2 years) old version of openBSD. Perhaps it is a bug that has been fixed in a later release? On Thu, Mar 26, 2015 at 06:11:37PM +0100, Alex Naumov wrote: # /etc/rc.d/snmpd restart httpd2 (pid 29518) already running # uname -a OpenBSD name 5.2 GENERIC#278 i386 # ps aux | grep snmpd root 23284 0.0 0.1 556 980 ?? IsWed04PM0:00.00 snmpd: parent (snmpd) _snmpd 28300 0.0 0.1 676 1380 ?? I Wed04PM0:00.55 snmpd: snmp engine (snmpd) root 23789 0.0 0.0 592 4 p0 R+ 6:06PM0:00.00 grep snmpd (ksh) # ls -la /var/run/ total 192 drwxr-xr-x 3 root wheel512 Mar 25 16:59 . drwxr-xr-x 25 root wheel512 Mar 29 2014 .. -rw-r--r-- 1 root wheel 6 Nov 13 08:17 cron.pid -rw-r--r-- 1 root wheel 49152 Nov 13 08:17 dev.db -rw-r--r-- 1 root wheel 9124 Nov 13 08:17 dmesg.boot -rw-r--r-- 1 root wheel 5 Nov 13 08:17 inetd.pid -r--r--r-- 1 root wheel 12460 Nov 13 08:17 ld.so.hints drwxr-xr-x 2 root wheel512 Nov 13 08:17 rc.d -rw--- 1 root wheel 70 Nov 13 08:17 sendmail.pid srw-rw 1 root wheel 0 Mar 25 16:59 snmpd.sock -rw-r--r-- 1 root wheel 5 Nov 13 08:17 sshd.pid -rw-r--r-- 1 root wheel 6 Nov 13 08:17 syslog.pid -rw-rw-r-- 1 root utmp7200 Mar 26 18:04 utmp Please look at first command's output. It looks like a bug or something like this. Of course I can find a pid and than kill this process, but... On Wed, Mar 25, 2015 at 6:09 PM, Joshua Smith jsm...@mail.wvnet.edu wrote: /etc/rc.d/snmpd restart always worked for me to restart snmpd. On Wed, Mar 25, 2015 at 06:02:30PM +0100, Alex Naumov wrote: Hello, I just want to ask about snmpd(8). As I can see, snmpd don't create pid file in /var/run directory. Is it correct? How to reboot this daemon? There is just sock-file. Thank you, Alex -- Joshua Smith Montani Semper Liberi -- Joshua Smith Montani Semper Liberi
Re: SNMP and PID file
It will be interesting to find information about this bug, if it's really bug. I can't update this system... but it will be interesting to figure out why it happen ;) On Thu, Mar 26, 2015 at 7:04 PM, Joshua Smith jsm...@mail.wvnet.edu wrote: You are running a pretty old ( 2 years) old version of openBSD. Perhaps it is a bug that has been fixed in a later release? On Thu, Mar 26, 2015 at 06:11:37PM +0100, Alex Naumov wrote: # /etc/rc.d/snmpd restart httpd2 (pid 29518) already running # uname -a OpenBSD name 5.2 GENERIC#278 i386 # ps aux | grep snmpd root 23284 0.0 0.1 556 980 ?? IsWed04PM0:00.00 snmpd: parent (snmpd) _snmpd 28300 0.0 0.1 676 1380 ?? I Wed04PM0:00.55 snmpd: snmp engine (snmpd) root 23789 0.0 0.0 592 4 p0 R+ 6:06PM0:00.00 grep snmpd (ksh) # ls -la /var/run/ total 192 drwxr-xr-x 3 root wheel512 Mar 25 16:59 . drwxr-xr-x 25 root wheel512 Mar 29 2014 .. -rw-r--r-- 1 root wheel 6 Nov 13 08:17 cron.pid -rw-r--r-- 1 root wheel 49152 Nov 13 08:17 dev.db -rw-r--r-- 1 root wheel 9124 Nov 13 08:17 dmesg.boot -rw-r--r-- 1 root wheel 5 Nov 13 08:17 inetd.pid -r--r--r-- 1 root wheel 12460 Nov 13 08:17 ld.so.hints drwxr-xr-x 2 root wheel512 Nov 13 08:17 rc.d -rw--- 1 root wheel 70 Nov 13 08:17 sendmail.pid srw-rw 1 root wheel 0 Mar 25 16:59 snmpd.sock -rw-r--r-- 1 root wheel 5 Nov 13 08:17 sshd.pid -rw-r--r-- 1 root wheel 6 Nov 13 08:17 syslog.pid -rw-rw-r-- 1 root utmp7200 Mar 26 18:04 utmp Please look at first command's output. It looks like a bug or something like this. Of course I can find a pid and than kill this process, but... On Wed, Mar 25, 2015 at 6:09 PM, Joshua Smith jsm...@mail.wvnet.edu wrote: /etc/rc.d/snmpd restart always worked for me to restart snmpd. On Wed, Mar 25, 2015 at 06:02:30PM +0100, Alex Naumov wrote: Hello, I just want to ask about snmpd(8). As I can see, snmpd don't create pid file in /var/run directory. Is it correct? How to reboot this daemon? There is just sock-file. Thank you, Alex -- Joshua Smith Montani Semper Liberi -- Joshua Smith Montani Semper Liberi
SNMP and PID file
Hello, I just want to ask about snmpd(8). As I can see, snmpd don't create pid file in /var/run directory. Is it correct? How to reboot this daemon? There is just sock-file. Thank you, Alex
Re: SNMP and PID file
/etc/rc.d/snmpd restart always worked for me to restart snmpd. On Wed, Mar 25, 2015 at 06:02:30PM +0100, Alex Naumov wrote: Hello, I just want to ask about snmpd(8). As I can see, snmpd don't create pid file in /var/run directory. Is it correct? How to reboot this daemon? There is just sock-file. Thank you, Alex -- Joshua Smith Montani Semper Liberi
Re: SNMP and PID file
On Wed, 25 Mar 2015 18:02:30 +0100 Alex Naumov wrote: I just want to ask about snmpd(8). As I can see, snmpd don't create pid file in /var/run directory. Is it correct? How to reboot this daemon? There is just sock-file. It is more reliable to look up the PID from the list of processes which is what rcctl does using the identifying strings set in /etc/rc.d/.