1835569 Members
2384 Online
110078 Solutions
New Discussion

logrotate

 
Ragni Singh
Super Advisor

logrotate

Hi all, I use lumberjack to rotate my logfiles and now after the logs were rotated, it doesn't seem to be writing to my syslog anymore. I did a -HUP to reread my config file but it doesn't seem to help. Here is what my lumberjack.conf looks like.

/var/adm/syslog/syslog.log root.root 644 30 4096 Z /var/run/syslog.pid
4 REPLIES 4
DCE
Honored Contributor

Re: logrotate

It sounds like the original syslog file was either moved or deleted. You cannot do this as basically the syslogd has the file open all the time. If lumberjack did a move, you will see the new file name being updated instead of the syslog.log. If lumberack did a delete, then the data is going to the bit bucket, as there is no file associated with inode used by the original syslog.log

One way to avoid the problem
copy the syslog.log to a new name
compress the new file

cat /dev/null > syslog.log to zero out the original file
Piergiacomo Perini
Trusted Contributor

Re: logrotate

Hi Sanjit,
i don't know lumberjack... but
in order to see if syslog is written
can try this:

#logger newentry

and then,

#tail -f /var/adm/syslog/syslog.log

(just a little hint)

regards
Ragni Singh
Super Advisor

Re: logrotate

thanks all I got it. I just restarted syslogd again and it seems to be writing once again. Thanks for the time.
Geoff Wild
Honored Contributor

Re: logrotate

Instead of lumberjack, try logrotate:

http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/logrotate-2.5/

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.