[BusyBox] syslogd circular buffer
Michael Sternberg
MichaelS at boscom.com
Tue May 7 04:42:03 UTC 2002
-- -----Original Message-----
-- [mailto:busybox-admin at busybox.net] On Behalf Of Joerg Schmitz-Linneweber
-- > How big is circular buffer syslogd uses ?
-- So I would think ~16k :-)
Thanks
-- > What happens on shutdown ? Can I use some switch telling syslogd to
write this buffer to disk in case of TERM signal ?
-- Add a signal handler for SIGTERM then.
To syslogd.c source you mean ?
-- Or add an entry to your inittab which then needs to do IPC (like the
logread prog.) with your syslogd.
So why not to use real logread ? I've made a little script named
save_logs.sh consisting
of one command "logread > /var/log/messages".
Here are some lines my new /etc/inittab file:
::restart:/etc/init.d/save_logs.sh
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/etc/init.d/save_logs.sh
::shutdown:/etc/init.d/rc 0
Well, it's not working. And can not - before init performs actions mentioned
in inittab
it send TERM and KILL to every process including syslogd. And logread from
my scripts
complains "Can't find circular buffer: no such file or directory". Sure -
syslogd is already dead at this time.
-- In the last case remember that entries with the same runlevel are
executed in the
-- *opposite* order as they appear in the file! (If I remember correctly)
I changed order of lines starting "restart" and "shutdown" - did not help.
-- > ... how can I increase interval between TERM and KILL signals that
halt issues to every process ?
-- Or again add a "sleep 10" to your inittab...
What do you mean ? sleep between what two things ? As I can see from the
sources this interval is hard-coded as "sleep(1)" in init.c :(
-- Salut, J?rg
Thanx anyway
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20020507/47227680/attachment-0001.htm
More information about the busybox
mailing list