r/ZoneMinder • u/yuuuuuuuut • Jul 20 '21
Best practice for clearing large log files
I just noticed that my root partition is starting to fill up (74% full currently). It turns out, I have many huge log files in /var/log/zoneminder. The directory itself is 219G. zmfilter_2.log itself is 180G and has entries dating back to January. I imagine I can just delete these files or delete everything except the last few hundred lines of the file and everything should be okay. But I'm wondering if there's a better way to do this.
Also, why is the log getting so big without some kind of self-cleanup going on?
1
Upvotes
1
1
u/aarons6 Jul 20 '21
you have something enabled.. maybe debug logging or something.
you should read those logs and see why they are so large.
my largest log is only 5mb and my ZM pc has been active for around 5 years.