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

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 ]  
0
Nav444
Asked:
Nav444
1 Solution
 
gheistCommented:
It works according to your rules - it never trims log mentioned.
"man newsyslog.conf" for more information.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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