mercredi 14 janvier 2015

Restarting syslog causes it to no longer listen on domain socket


Standard syslog setup on Mavericks.


1. Before stopping and starting syslog:


$ lsof | grep syslog


launchd 1 root 6u unix 0xec11da089f2493d9 0t0 /private//var/run/syslog


syslogd 16 root cwd DIR 1,4 1156 2 /


syslogd 16 root txt REG 1,4 130176 3240731 /usr/sbin/syslogd


syslogd 16 root txt REG 1,4 622896 3239781 /usr/lib/dyld ...


2. Then stop and start syslog:


$ launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist; sleep 1; launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist


3. Now, syslog no longer listens to /var/run/syslog:


$ lsof | grep syslog


syslogd 716 root cwd DIR 1,4 1156 2 /


syslogd 716 root txt REG 1,4 130176 3240731 /usr/sbin/syslogd


syslogd 716 root txt REG 1,4 622896 3239781 /usr/lib/dyld ...


4. Reboot machine, and syslog is back to listening on /var/run/syslog domain socket is back. Why would this happen?





Aucun commentaire:

Enregistrer un commentaire