Hi,
while diagnosing some errors (one of the zabbix processes died with SIGSEVG), I needed to get a core dump from the process to figure out why it died. This normally does not work, as Zabbix does a chdir("/") during startup as any well-behaved daemon should do, but of course can't drop a core file there.
I've added a new config file directive to zabbix_server (and _agent, while I was already there) to specify a different working directory:
While running with this line in the config file, the server will chdir("/tmp") and (if something bad happens) write a core file there, which can be looked into using gdb (or whatever your favourite debugger is).
Without a ``WorkingDirectory''' directive in the config file, the Zabbix server will revert to the standard procedure and chdir("/").
Best regards,
\Bernhard.
PS: Ooops, forgot to mention that this patch is again with respect to the ``developers'' pre-zabbix-1.5.tar.gz from 2008-02-18. The line numbers might be a bit off (due to the ``child died exit status'' patch postet 5 minutes ago)
while diagnosing some errors (one of the zabbix processes died with SIGSEVG), I needed to get a core dump from the process to figure out why it died. This normally does not work, as Zabbix does a chdir("/") during startup as any well-behaved daemon should do, but of course can't drop a core file there.
I've added a new config file directive to zabbix_server (and _agent, while I was already there) to specify a different working directory:
Code:
WorkingDirectory /tmp
Without a ``WorkingDirectory''' directive in the config file, the Zabbix server will revert to the standard procedure and chdir("/").
Best regards,
\Bernhard.
PS: Ooops, forgot to mention that this patch is again with respect to the ``developers'' pre-zabbix-1.5.tar.gz from 2008-02-18. The line numbers might be a bit off (due to the ``child died exit status'' patch postet 5 minutes ago)