Self-repair, diagnosis

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Self-repair, diagnosis

Post 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?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post 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
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post 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.
erpo41
Posts: 18
Joined: Mon Jan 24, 2011 7:11 am

Post 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?
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Self-repair, diagnosis

Post 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.
Kfir Itzhak.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re:

Post 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.
Kfir Itzhak.
Post Reply