Feature Request: Unique event numbers between restarts
Description
It would be really helpful if the event_nr would be unique, even between restarts of motion.
at the moment, event_nr starts at 1 after a restart.
saving the last used event_nr to a file and use that as starting point after a restart would be one way of doing it I suppose, removing that file would then cause the counter to be reset to 1 again.
--
TWikiGuest - 22 Sep 2005
Follow up
Check out the new snap release 3.2.4_snap2
MotionRelease3x2x4snap2
I implemented a new convertion specifier which can create event time stamps instead of the event counter.
I do not wish to make Motion depending on being able to write to a file. I think this new alternative is much better and more flexible.
--
KennethLavrsen - 22 Sep 2005
Yes, that is a very workable solution
thanks!
Taco
--
TWikiGuest - 24 Sep 2005
Hi,
I am using Motion running for many days and am wondering how high the Event Number can reach? Is it, say, an unsigned int?
And is there a way to reset it, for example, at midnight. (I realise that exiting Motion and re-starting will achieve this, of course. This can be arranged programmatically.)
Thanks,
Simon.
--
SimonW - 26 Oct 2006
It is a normal integer. I would think the limit is 2147483647 on most modern Linuxes.
--
KennethLavrsen - 29 Oct 2006
Thanks for that Kenneth,
Do you have any idea how to reset the event number, other than closing down Motion and restarting it?
Simon.
--
SimonW - 30 Oct 2006
I've answered my own question, after reading the code I see it's already been provisioned for.
To restart motion, signal it with a SIGHUP, ie. kill -1 'pid-of-motion'
or (more usefully) killall -HUP motion
The 'restart' flag is internally set and it restarts. Thus the event number will be set back to 1. I have yet to test this (have to wait for midnight......)
--
SimonW - 21 Nov 2006