Page 1 of 1

Self-repair, diagnosis

Posted: Thu Aug 07, 2008 10:07 pm
by coke
It seems most/many of the questions on the forum involve people not getting an image, needing to show us the logs, and often have the shared memory issue. It'd be interesting if ZM, when having a problem with the camera, had a diagnose button. Checks shared memory settings, various file permissions, then pops up a text window with the appropriate log information to post to the forum, since many ZM newbies can't find their logs anyway.

Also could calculate the appropriate shared memory settings, make sure it's ok with the user, then repair them itself. Same with corrupted database files, could do an auto-repair on starting.

Couldn't solve everything (well, without loads of work), but could save a lot of frustration for users and posters.

Any thoughts?

Posted: Thu Aug 07, 2008 11:23 pm
by jameswilson
if zm was only supported as its own distro then id say yeah, problem is all this distro's work in a slightly different way, it would be impossible for phil to write it. I for one would prefer a normal official zm distro that was updated etc, while the real gurus could still build it from source. But the support would be different. Most people use zm on its own machine anyway due to its requirements. but if that was done then yes great idea

Posted: Fri Aug 08, 2008 7:10 pm
by coke
Some day when I have some time to kill (hah), I'll see what I can do about implementing at least a little of it. Like checking the logs for "can't shmget" and offering them a link to the appropriate forum/wiki page.

Posted: Sun Mar 06, 2011 2:11 am
by erpo41
I am really angry about all of the time I wasted trying to get an image on my zoneminder system when it was a simple shared memory issue. I demand a full refund of the full amount I paid for the software.

Kidding aside, I am willing to do the coding to fix this if someone will point me in the right direction inside the zoneminder source code. Is there a getting started guide to hacking zoneminder?

Re: Self-repair, diagnosis

Posted: Sat Mar 19, 2011 5:30 am
by mastertheknife
Hi,

In ZM SVN (and 1.24.3) the default shared memory mode is mmap, which unlike shm shared memory, should not require any configuration (e.g. shmmax shmall stuff). This is a good step in the right direction.

The error handling and reporting for ZM is terrible and really needs to be improved to output helpful messages. Also, in the syslog should be only errors and warnings, the other information should go to a zm log to prevent syslog spamming.

mastertheknife.

Re:

Posted: Sat Mar 19, 2011 5:33 am
by mastertheknife
erpo41 wrote:I am really angry about all of the time I wasted trying to get an image on my zoneminder system when it was a simple shared memory issue. I demand a full refund of the full amount I paid for the software.

Kidding aside, I am willing to do the coding to fix this if someone will point me in the right direction inside the zoneminder source code. Is there a getting started guide to hacking zoneminder?
As far as i know there isn't any guide. I understood most of the code simply by reading it. After you get the idea of zm's layout (zma, zmc, zms) it will be easier.
You can grab the source from the SVN here: http://svn.zoneminder.com/

mastertheknife.