(How to?) Rotate log files

Forum for questions and support relating to the 1.24.x releases only.
Locked
BlankMan
Posts: 147
Joined: Tue Jan 19, 2010 2:53 am
Location: Milwaukee, WI USA

(How to?) Rotate log files

Post by BlankMan »

So how do you rotate off the zmaudit.log, zmdc.log, zmfilter.log, zmwatch.log, & zmupdate.log log files without stopping ZoneMinder?

They all have a channel open from their respective processes and not from syslog so moving them out and creating new ones like I do with syslog log files then HUP'ing syslog isn't going to work. So it looks like to roll off the log files you have to stop and start ZoneMinder? Which is something you don't really want to do periodically with a security surveillance system. Well at least I don't.

I haven't tried kill -HUP for obvious reason but can these processes be HUP'd that way without them dying and will that cause them to release the old log file and use a new one? Or is there some other way to accomplish this?
scsi
Posts: 6
Joined: Wed Nov 03, 2010 1:30 pm

Post by scsi »

BlankMan
Posts: 147
Joined: Tue Jan 19, 2010 2:53 am
Location: Milwaukee, WI USA

Post by BlankMan »

Thanks. But I was hoping that I could set zmaudit, zmdc, zmfilter, zmwatch, & zmupdate to directly use syslog like zoneminder itself does and not open and keep open and write their own files as they currently do. And I saw nothing in that documentation that indicates that can be done.

But the logrotate template in the doc even though I do not use logrotate or have it installed shows the "zmpkg.pl logrot" so if all of the above processes have that at least it is a way to get it done.
Locked