1753532 Members
6008 Online
108795 Solutions
New Discussion юеВ

Extending SYSLOG

 
SOLVED
Go to solution
Richard Barcellano_1
Occasional Advisor

Extending SYSLOG

Hello,

I would like to have a 30 days retention of syslog in unix. Is there a way on how to do this?

Thanks
Change is the world's constant
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: Extending SYSLOG

Syslog keeps information since the last time the machine was rebooted.

If you only want to keep 30 days worth, you could stop and restart syslogd every month.

When syslogd starts (if you do it via '/sbin/init.d/syslogd start') it moves syslog.log to OLDsyslog.log. From there you could move OLDsyslog.log to syslog.log.NOV or whatever you desire.
Peter Godron
Honored Contributor

Re: Extending SYSLOG

Richard,
for suggested solutions please see:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=177825

Either:
- create a script
- use logrotate:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/logrotate-2.5/

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions. Your profile shows only 2 out of 28 answers received points.
Calandrello
Trusted Contributor

Re: Extending SYSLOG

Friend
case schemes it is not restarted syslog not sera extinguished. apos reboot it saved syslog old in the OLDsyslog archive
Coolmar
Esteemed Contributor

Re: Extending SYSLOG

Hi Richard,

Your best bet would be to write your own script which would be fairly simple or use Logrotate (which I have used in the past and quite liked).
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/

S