zms_eXXXX.log files?

Current Development version likely to have breaking changes
Post Reply
pygr
Posts: 48
Joined: Fri Apr 21, 2023 11:49 pm

zms_eXXXX.log files?

Post by pygr »

Is it intended for these files to accumulate without limit? Would it make more sense to rotate them and delete the older ones?

pygr
User avatar
iconnor
Posts: 2862
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zms_eXXXX.log files?

Post by iconnor »

yes, probably a better logrotate config would be in order.

I put maxage 7 in mine.


/var/log/zm/*.log {
missingok
notifempty
sharedscripts
delaycompress
compress
postrotate
/usr/bin/zmpkg.pl logrot >>/dev/null 2>&1 || :
endscript
daily
rotate 7
maxage 7
}
pygr
Posts: 48
Joined: Fri Apr 21, 2023 11:49 pm

Re: zms_eXXXX.log files?

Post by pygr »

My /etc/logrotate.d/zoneminder is exactly what you show.

Why are there still logs hanging around since May 20 (the day after I cleared out these logs manually)?

Code: Select all

...
-rw-r--r-- 1 www-data www-data      19734 May 26 22:21 zms.log.5.gz
-rw-r--r-- 1 www-data www-data      20555 May 25 21:24 zms.log.6.gz
-rw-r--r-- 1 www-data www-data          0 May 22 00:01 zms_e1592.log
-rw-r--r-- 1 www-data www-data     243710 May 20 21:31 zms_e1592.log.1
-rw-r--r-- 1 www-data www-data          0 May 22 00:01 zms_e1594.log
-rw-r--r-- 1 www-data www-data     287775 May 20 21:33 zms_e1594.log.1
-rw-r--r-- 1 www-data www-data          0 May 22 00:01 zms_e1596.log
-rw-r--r-- 1 www-data www-data     202728 May 20 21:33 zms_e1596.log.1
-rw-r--r-- 1 www-data www-data          0 May 22 00:01 zms_e1598.log
-rw-r--r-- 1 www-data www-data     285322 May 20 21:33 zms_e1598.log.1
-rw-r--r-- 1 www-data www-data          0 May 22 00:01 zms_e1632.log
-rw-r--r-- 1 www-data www-data     202751 May 20 21:38 zms_e1632.log.1
-rw-r--r-- 1 www-data www-data          0 May 22 00:01 zms_e1634.log
-rw-r--r-- 1 www-data www-data     177396 May 20 21:38 zms_e1634.log.1
...
Is it because these files don't all start off with the same name?

pygr
Post Reply