Link to home
Start Free TrialLog in
Avatar of Nav444
Nav444

asked on

Free BSD : newsyslog setup for Hourly log rotate

Hi,
I am trying to rotate logs every hour using newsyslog

I have following in /etc/newsyslog.conf
# logfilename               [owner:group]    mode count size when [ZJB] [/pid_file]                   [sig_num]
/www/logs/access_log                            644   30       *     *      B     /www/logs/httpsd.pid     30

and I have following crontab
0 * * * *      newsyslog

but it is not rotate logs!
I did restart apache every time I made changes to newsyslog.conf file, but still not working!
When I use @T00 switch for time, it works and rotates every midnight, but what is the switch for every hour?
Please help!

Also is there a way to change the format of logfile name? like force it to create [ access_log.14.1 ] ?
[ which means access log of hour 14, day 1 ]  
Avatar of bira
bira

ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial