Nsd4 process weirdness?

Hi,

I was playing with the munin plugin in nsd4 beta4, and saw some strange
errors. Directly after starting nsd on linux, I'm seeing:

$ ps ax -o pid,ppid,user,args | grep nsd
1638 1 nsd /usr/sbin/nsd -c /etc/nsd/nsd.conf
1641 1638 nsd /usr/sbin/nsd -c /etc/nsd/nsd.conf
1647 1641 nsd /usr/sbin/nsd -c /etc/nsd/nsd.conf

$ sudo munin-run nsd_munin_memory
/etc/munin/plugins/nsd_munin_memory: line 377: test: : integer
expression expected
/etc/munin/plugins/nsd_munin_memory: line 383: test: expr: syntax error:
integer expression expected
/etc/munin/plugins/nsd_munin_memory: line 389: test: : integer
expression expected
/etc/munin/plugins/nsd_munin_memory: line 395: test: expr: syntax error:
integer expression expected
size_vsz 0
size_rss 0
size_db_mem.value 124776
size_xfrd_mem.value 12622376
size_config_mem.value 1928
size_db_disk.value 334848
size_config_disk.value 371

$ ps ax -o pid,ppid,user,args | grep nsd
1638 1 nsd /usr/sbin/nsd -c /etc/nsd/nsd.conf
2912 1 nsd /usr/sbin/nsd -c /etc/nsd/nsd.conf
2913 2912 nsd /usr/sbin/nsd -c /etc/nsd/nsd.conf

The munin errors are generated because the child process of pid 1638
(1641 in above output) went away, occurring while pulling vsz and rss
numbers from ps output. That might a c/p error from the unbound plugin
(unbound creates threads that all keep the same ppid).

But I'm mostly interested in nsd forking a new process (2912) detached
from the parent...

Kind regards,
  Tom

Hi Tom,

Hi,

I was playing with the munin plugin in nsd4 beta4, and saw some
strange errors. Directly after starting nsd on linux, I'm seeing:

The errors you see are caused by a shell script issue, compounded by
the ps output that does not work with the nsd_munin_ script.

The process that forked and seems detached from the parent is normal
after nsd reload processing. But this caused the statistics problems.

In svn trunk I have updated nsd4 to have a new nsd-control command
serverpid that prints out the pid of the process with the interesting
RSS and VSZ. That is used by the munin script (that I also updated)
to output the correct values.

Very intermittently this may fail and print 0 memory usage, but for
munin that should be good enough to get a graph about memory usage.

Would you like to try this updated version?

Best regards,
   Wouter

Hi Wouter,

I just tried with r3882, and that seems to work. I see you also fixed
the zones monitoring part which seemed broken too (but I did not have a
chance to look into that yet).

Thanks again,
  Tom