dhcpd stops logging

Tina Siegenthaler tina at zool.unizh.ch
Tue Dec 19 15:12:40 UTC 2006


Am 19.12.2006 um 11:57 schrieb Shane Kerr:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tina Siegenthaler wrote:
>>> Does syslog stop logging to other files at the same time?
>>
>> I don't think so, but since I haven't got any other app that
>> generates messages as regularly as dhcpd, I can't really tell.
>> Wait... now I remember, when it happened last Friday, I tried "logger
>> -p local1.info test", to test if syslogd has stopped accepting any
>> messages, but it apparently hadn't, since that message appeared in
>> the dhcpd.log (I'll try that again as soon as possible). It seems
>> that somehow dhcpd and syslogd loose contact, but I don't know who is
>> dropping it in the first place...
>
> You should be able to use "lsof" to see the files that the DHCP  
> server has open.
> One of them should be /var/run/log, which according to the OS X man  
> page is the
> socket used for logging:
>
> http://developer.apple.com/documentation/Darwin/Reference/ManPages/ 
> man8/syslogd.8.html
>
> If this file is not open, then the DHCP server has lost the  
> connection. In this
> case, it is probably a bug, but it could be in the syslog() library  
> call, in the
>  syslogd, or in the OS itself.
>
> A possible solution may be to use syslog-ng:
>
> http://www.macosxhints.com/article.php?story=20040710171559860
>
> This won't help if the problem is in the syslog() library call. In  
> that case, we
> may be able to put together a workaround, but it will be a bit of a  
> hack.
>
> - --
>
OK, it just happened again (on both peers). I checked the open files  
with  lsof, and they were as follows:

On the first peer:

COMMAND  PID USER   FD     TYPE     DEVICE SIZE/OFF     NODE NAME
dhcpd   1169 root  cwd     VDIR       14,9     4012   119921 /private/ 
etc
dhcpd   1169 root  txt     VREG       14,9  2366096   305156 /usr/ 
sbin/dhcpd
dhcpd   1169 root  txt     VREG       14,9  1793424   355759 /usr/lib/ 
dyld
dhcpd   1169 root  txt     VREG       14,9  4398100   355974 /usr/lib/ 
libSystem.B.dylib
dhcpd   1169 root    0w    VREG       14,9   137696   360288 /private/ 
var/db/dhcpd.leases
dhcpd   1169 root    3r  PSXSHM 0x015ceb24     4096           
obj=0x019ffd40
dhcpd   1169 root    4u    unix 0x01c7f9a0      0t0          - 
 >0x0170a5f0
dhcpd   1169 root    5r  PSXSHM 0x0194ce24     4096           
obj=0x019ffd40
dhcpd   1169 root    6u    IPv4 0x019a7e10      0t0     ICMP *:*
dhcpd   1169 root    7u    IPv4 0x016aa5f0      0t0      UDP *:bootps
dhcpd   1169 root    9u    VCHR       23,0  0t69382 24039300 /dev/bpf0
dhcpd   1169 root   10u    IPv4 0x01c897e4      0t0      TCP zool- 
admin04.unizh.ch:49970->130.60.23.114:efs (ESTABLISHED)
dhcpd   1169 root   11u    IPv4 0x019b3ff4      0t0      TCP zool- 
admin04.unizh.ch:efs (LISTEN)

and on the other one:

COMMAND PID USER   FD     TYPE     DEVICE SIZE/OFF     NODE NAME
dhcpd   963 root  cwd     VDIR       14,9     1598     3169 /private/ 
var/log
dhcpd   963 root  txt     VREG       14,9  2418384   216411 /usr/sbin/ 
dhcpd
dhcpd   963 root  txt     VREG       14,9  1793424   221099 /usr/lib/ 
dyld
dhcpd   963 root  txt     VREG       14,9  4398100   221308 /usr/lib/ 
libSystem.B.dylib
dhcpd   963 root    0u    IPv4 0x022d33ec      0t0      TCP  
130.60.23.114:efs->zool-admin04.unizh.ch:49970 (ESTABLISHED)
dhcpd   963 root    2w    VREG       14,9   109880   239846 /private/ 
var/db/dhcpd.leases
dhcpd   963 root    3u    unix 0x01c14dc0      0t0          ->0x01c11e40
dhcpd   963 root    4r  PSXSHM 0x01dba7e4     4096           
obj=0x01e9a618
dhcpd   963 root    5u    IPv4 0x01e7be10      0t0     ICMP *:*
dhcpd   963 root    6u    IPv4 0x01bb15f0      0t0      UDP *:bootps
dhcpd   963 root    8u    VCHR       23,0  0t20884 29299332 /dev/bpf0
dhcpd   963 root   10u    IPv4 0x022d4490      0t0      TCP  
130.60.23.114:efs (LISTEN)

so, no var/run/log. I restarted syslogd and dhcpd, but still, there  
was no open /var/run/log:

Primary:
COMMAND  PID USER   FD     TYPE     DEVICE SIZE/OFF     NODE NAME
dhcpd   1194 root  cwd     VDIR       14,9     4012   119921 /private/ 
etc
dhcpd   1194 root  txt     VREG       14,9  2366096   305156 /usr/ 
sbin/dhcpd
dhcpd   1194 root  txt     VREG       14,9  1793424   355759 /usr/lib/ 
dyld
dhcpd   1194 root  txt     VREG       14,9  4398100   355974 /usr/lib/ 
libSystem.B.dylib
dhcpd   1194 root    3r  PSXSHM 0x015ceb24     4096           
obj=0x019ffd40
dhcpd   1194 root    4u    unix 0x01c7f3b0      0t0          - 
 >0x0170e150
dhcpd   1194 root    5r  PSXSHM 0x018c35c4     4096           
obj=0x019ffd40
dhcpd   1194 root    6u    IPv4 0x019a7e10      0t0     ICMP *:*
dhcpd   1194 root    7u    IPv4 0x016aae10      0t0      UDP *:bootps
dhcpd   1194 root    8w    VREG       14,9   130721   360296 /private/ 
var/db/dhcpd.leases
dhcpd   1194 root    9u    VCHR       23,0    0t720 24039300 /dev/bpf0
dhcpd   1194 root   10u    IPv4 0x019b3ff4      0t0      TCP zool- 
admin04.unizh.ch:49983->130.60.23.114:efs (ESTABLISHED)
dhcpd   1194 root   11u    IPv4 0x01c88740      0t0      TCP zool- 
admin04.unizh.ch:efs (LISTEN)

Secondary:
COMMAND  PID USER   FD     TYPE     DEVICE SIZE/OFF     NODE NAME
dhcpd   1003 root  cwd     VDIR       14,9     3298     3116 /private/ 
etc
dhcpd   1003 root  txt     VREG       14,9  2418384   216411 /usr/ 
sbin/dhcpd
dhcpd   1003 root  txt     VREG       14,9  1793424   221099 /usr/lib/ 
dyld
dhcpd   1003 root  txt     VREG       14,9  4398100   221308 /usr/lib/ 
libSystem.B.dylib
dhcpd   1003 root    3r  PSXSHM 0x01b1a6e4     4096           
obj=0x01e9a618
dhcpd   1003 root    4u    unix 0x01c11ab0      0t0          - 
 >0x01c11850
dhcpd   1003 root    5r  PSXSHM 0x01d7e204     4096           
obj=0x01e9a618
dhcpd   1003 root    6u    IPv4 0x01e7be10      0t0     ICMP *:*
dhcpd   1003 root    7u    IPv4 0x01bb1520      0t0      UDP *:bootps
dhcpd   1003 root    8w    VREG       14,9   105360   239852 /private/ 
var/db/dhcpd.leases
dhcpd   1003 root    9u    VCHR       23,0      0t0 29299332 /dev/bpf0
dhcpd   1003 root   10u    IPv4 0x022d4490      0t0      TCP  
130.60.23.114:49615->zool-admin04.unizh.ch:efs (ESTABLISHED)
dhcpd   1003 root   11u    IPv4 0x022d3740      0t0      TCP  
130.60.23.114:efs (LISTEN)


In fact, I can't see any difference in the open files before and  
after the restart, except for the secondary peer, where I have / 
private/var/log before and /private/etc after the restart.
BTW, I even don't have a file /var/run/log, but there is a /var/run/ 
syslog. Would that be the one?

I then checked the open files of syslogd (only after the restart),  
and it indeed has /private/var/log/dhcp.log open. I'll check for that  
file when the logging stops again...

Meanwhile, I'll go and get some information about syslog-ng, I've  
already heard about it, but not a lot.


Tina







More information about the dhcp-users mailing list