I installed and used a very old ZoneMinder box. When it died last year, I installed 1.36.33 on a newer system. Unfortunately, I ran into an issue where the ]inode table got full (viewtopic.php?t=33019) and ZM was complaining the disk was full even though there was over 700 gig of space left. After getting input here & doing research elsewhere, I stopped the zoneminder service, backed up the directory except for the events/#/* directories, unmounted the file system, created a new ext4 file system with 2.5x the number of inodes the prior one had, adjusted fstab to mount it by device ID rather than UUID, mounted it, restored the backup, and finally started the zoneminder service. ZoneMinder appears to be recording again & hopefully this will be the end of the issue with the inodes running out.
Unfortunately, all of the old events (none of which exist on disk anymore) are still being shown in the ZoneMinder GUI. The ancient version I was using would clean up the database on it's own if an event was removed from disk, but this does not appear to be happening in the new version. Is there a way to trigger this to happen or do I need to go mucking around in the database, using SQL to erase the events in it directly?
Database Cleanup?
Database Cleanup?
This message is made up of not less than 90% recycled electrons.
-
- Posts: 1336
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Database Cleanup?
Did you try zmaudit? sudo zmaudit.pl
or turn on Options->System->RUN_AUDIT, but back off after it runs a day or three.
Not that it's not real fast...
or turn on Options->System->RUN_AUDIT, but back off after it runs a day or three.
Not that it's not real fast...
Re: Database Cleanup?
This was recently talked about. The zm.Event_Summaries table is the one that has the data that shows on the website. When backing up only the config, it is ignored see: https://wiki.zoneminder.com/MySQL#Backup_config_only and that starts the numbers back at zero. I think in your case clearing the table might restore it back to zero (but untested at the moment). If you start recording on one of those monitors, it should refresh the numbers for that monitor.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Re: Database Cleanup?
Thank you - running zmaudit is cleaning up the database as I write this.
This message is made up of not less than 90% recycled electrons.
Re: Database Cleanup?
FYI, the zmaudit.pl script finished and left several thousand events behind in the database that do not exist on the disk. Ran it several times & all it reported was several lines of 'Deleted 10 log table entries by time'. Had to create a custom filter to delete all events older than a few days ago - that is now running to flush out the old events.
This message is made up of not less than 90% recycled electrons.
-
- Posts: 1336
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: Database Cleanup?
Yeah it doesn't always do the job, unfortunately. Dunno why.
While you're at it, make sure you don't have a bunch of trash in the trash...
While you're at it, make sure you don't have a bunch of trash in the trash...