1754014 Members
5133 Online
108811 Solutions
New Discussion юеВ

syslog.log switch

 
SOLVED
Go to solution
Vladimir Tihu
Advisor

syslog.log switch


When syslog.log is renamed OLDsyslog.log and a new syslog.log is created, how can this event be trapped? I want to be notified of this syslog switch so that I can save the logs for history.
5 REPLIES 5
Eugeny Brychkov
Honored Contributor

Re: syslog.log switch

This happens at each reboot. So simply insert copy command to any startup script
Eugeny
John Palmer
Honored Contributor

Re: syslog.log switch

It's actually done by the syslog startup script. Have a look at /sbin/init.d/syslogd.

Regards,
John
T G Manikandan
Honored Contributor

Re: syslog.log switch

Each time the system is rebooted the syslog.log file gets renamed to OLDsyslog.log file and new syslog.log file is created.

This is configured under /sbin/rc2.d/S220syslogd script.


Thanks
Vladimir Tihu
Advisor

Re: syslog.log switch


The reboot is it the ONLY condition for this switch or are there others, like syslog.log exceeding a certain size, calls like openlog() or closelog() etc. Is there a system-wide event broadcasted or signalled with this occasion?

Thanks
Pete Randall
Outstanding Contributor
Solution

Re: syslog.log switch

No, just reboot. Any trimming or other manipulation of the log is manual.

Pete

Pete