1833827 Members
2346 Online
110063 Solutions
New Discussion

Syslog Question

 
Chad Rendell_1
Occasional Contributor

Syslog Question

Is there a way to allow syslog to append new entries instead of creating syslog.old. I want to open Syslog even after a reboot and see all messages. I hope this makes sence
None at this time
3 REPLIES 3
Jeff Schussele
Honored Contributor

Re: Syslog Question

Hi Chad,

The only way I know is to edit the /sbin/init.d/syslogd script & comment out the

mv /var/adm/syslog/syslog /var/adm/syslog/OLDsyslog.log

AND

> /var/adm/syslog/syslog.log

lines. This is where that action is performed.

BUT NOTE: Any changes here are fair game to be overwritten by a patch in the future!

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Poff
Honored Contributor

Re: Syslog Question

Hi Chad,

One way to do it might be to add a script to your startup that will append the contents of OLDsyslog.log to another syslog file, something like syslog.log.all. That way you would always have all the syslog messages in one file no matter how many times your system reboots. Plus, your script would be separate from the standard system scripts and it would be safe from any patches in the future.

JP
Steven E. Protter
Exalted Contributor

Re: Syslog Question

You don't want to do post 1. syslog.log needs to be of reasonable size so you can actually use it for problem diagnosis.

A different idea would be to add a startup script that cat oldsyslog >> /home/root/biglog

Do it as a seperate install script so that future patches don't overwrite you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com