• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1375
  • Last Modified:

Free BSD : newsyslog setup for Hourly log rotate

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 ]  
1 Solution
It works according to your rules - it never trims log mentioned.
"man newsyslog.conf" for more information.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now