I'm trying to set up syslog-ng to rotate it's logs with logrotate. One question this brings to mind is whether syslog-ng will restart with the HUP signal. #/bin/kill -HUP `cat /var/run/syslog-ng.pid` Thanks, Brian Seppanen Charter Communications Regional Data Center 906-228-3100 ext 23 Marquette, MI seppy@chartermi.net
Nevermind. Sorry. read the man page.
#/bin/kill -HUP `cat /var/run/syslog-ng.pid`
Brian Seppanen seppy@chartermi.net
I'm trying to set up syslog-ng to rotate it's logs with logrotate. One question this brings to mind is whether syslog-ng will restart with the HUP signal.
#/bin/kill -HUP `cat /var/run/syslog-ng.pid`
yes. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
I saw the e-mail below and have a question: I'm currently using Caldera's Linux to host my syslog-ng. I currently use a cron script similar to below to stop, rotate my logs and restart the service (obviously not ideal, there's a brief moment where I lose messages). When I look at the man page for kill I do not see a -HUP switch. Does anyone know if this is just an undocumented option, or is it not available? If not, any ideas on what I can do to fix this? Thanks for any help you can provide, JonM Balazs Scheidler wrote:
I'm trying to set up syslog-ng to rotate it's logs with logrotate. One question this brings to mind is whether syslog-ng will restart with the HUP signal.
#/bin/kill -HUP `cat /var/run/syslog-ng.pid`
yes.
-- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1 url: http://www.balabit.hu/pgpkey.txt
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng
jmad on Thu, Mar 08, 2001 at 12:05:12PM -0600: Hi,
I'm currently using Caldera's Linux to host my syslog-ng. I currently use a cron script similar to below to stop, rotate my logs and restart the service (obviously not ideal, there's a brief moment where I lose messages). When I look at the man page for kill I do not see a -HUP switch. Does anyone know if this is just an undocumented option, or is it not available? If not, any ideas
In this case, -HUP is not really a switch, it's a short way of saying 'kill -s HUP ...', where HUP is the symbolic name of signal no.1, the hangup signal. On Linux, try kill -l to see what signals are available, or look at the signal header file /usr/include/bits/signum.h As for rotating logs, you might want to think about using log destina- tions like this: destination d_foo { file ("/var/log/foo.log.$YEAR$MONTH$DAY"); }; This will create files with date extensions. If you don't care about old logs, you could have a cronjob like this: 0 0 * * * find /var/log -mtime +5 -exec rm {} \; This will delete everything below /var/log that has not been modified in 5 days. Use 'find [...] -exec [...]' with extreme caution. Greetings, Gregor. -- Gregor Binder <gregor.binder@sysfive.com> http://sysfive.com/~gbinder/ sysfive.com GmbH UNIX. Networking. Security. Applications. PGP id: 0x20C6DA55 fp: 18AB 2DD0 F8FA D710 1EDC A97A B128 01C0 20C6 DA55
participants (4)
-
Balazs Scheidler
-
Brian E. Seppanen
-
Gregor Binder
-
jmad