Page 1 of 1

Zoneminder + Rasberry Pi issues

Posted: Wed Nov 20, 2013 7:07 am
by kalendrinn
I have been able to get Zoneminder installed on my Rasberry Pi revB and it is running. However, I am getting errors in the logs which I do not understand and have found no information on.

Nov 19 22:39:30 picontroller zmdc[3287]: INF [Starting pending process, zmc -m 3]
Nov 19 22:39:30 picontroller zmdc[3287]: INF ['zmc -m 3' starting at 13/11/19 22:39:30, pid = 3373]
Nov 19 22:39:30 picontroller zmdc[3373]: INF ['zmc -m 3' started at 13/11/19 22:39:30]
Nov 19 22:39:30 picontroller zmdc[3287]: INF ['zmc -m 3' crashed, signal 6]
Nov 19 22:39:34 picontroller zmdc[3287]: INF [Starting pending process, zma -m 3]
Nov 19 22:39:34 picontroller zmdc[3287]: INF ['zma -m 3' starting at 13/11/19 22:39:34, pid = 3375]
Nov 19 22:39:34 picontroller zmdc[3375]: INF ['zma -m 3' started at 13/11/19 22:39:34]
Nov 19 22:39:34 picontroller zma_m3[3375]: ERR [Shared data not initialised by capture daemon]
Nov 19 22:39:34 picontroller zmdc[3287]: ERR ['zma -m 3' exited abnormally, exit status 255]

I have adjusted the shared memory per the wiki as well as setting it much higher and it is still complaining about shared data not initializing. Also, I am not sure what exit status 255 is and why that is showing up. I also don't know why zmc is dying with signal 6 or what that refers to. I had installed Zoneminder and gotten my camera to work for max 2 minutes but it was after a reboot (prior to the shared memory changes) and completely random and has not worked since.

Please help. I would like to get this working properly. Anything else I can post to help resolve the issue? At this point I don't really know what would help. I followed the wiki for .deb installs and had to install a bunch of packages but fear I might be missing some still.

Any and all help is appreciated.

Re: Zoneminder + Rasberry Pi issues

Posted: Wed Nov 20, 2013 7:40 am
by kalendrinn
So believe it or not after hours of trying to figure the errors out and iron out the issues, I created a completely new monitor, deleted the old one, restarted zoneminder and it is working...sort of. It is giving me the errors/warnings on corrupt jpeg images but I understand that is to be ignored and it will be suppressed in the next version. I am also getting this error:

Nov 19 23:43:00 picontroller zmwatch[3651]: ERR [Shared data size conflict in shared_data for monitor Monitor-4, expected 328, got 316]

The issue I can see now is the video playback is absolutely slow as snot. It reports 3fps but it's not even near that. Maybe a 20-30s delay in image updates when viewing the video.

What is the error above and why did it suddenly show up? Is this why it's so slow?

Re: Zoneminder + Rasberry Pi issues

Posted: Wed Nov 20, 2013 6:45 pm
by mikb
kalendrinn wrote: Nov 19 22:39:30 picontroller zmdc[3287]: INF ['zmc -m 3' crashed, signal 6]
dying with signal 6 or what that refers to
To find out what signal numbers mean, without cheating and Googling ;-

# kill -l

HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF
WINCH POLL PWR SYS RTMIN RTMIN+1 RTMIN+2 RTMIN+3 RTMAX-3 RTMAX-2 RTMAX-1 RTMAX

That list starts at 1. Sig 6 = Abort. No clearer, is it ;) But at least you know now.
kalendrinn wrote: Nov 19 22:39:34 picontroller zmdc[3287]: ERR ['zma -m 3' exited abnormally, exit status 255]
Also, I am not sure what exit status 255 is
Exit status will be dependent on the writer of "zma", that's the return code from a self-confessed failing program.

Sounds like your shared memory settings are still not quite right.

Re: Zoneminder + Rasberry Pi issues

Posted: Thu Nov 21, 2013 3:10 am
by kalendrinn
I think the last error I was seeing is a code issue on determining the architecture:

Nov 20 18:41:23 picontroller zmwatch[3651]: ERR [Shared data size conflict in shared_data for monitor Monitor-4, expected 328, got 316]

Resolved it with the fix here, though there might be something better or maybe the dev's can explain the issue (forums didn't want me posting an external URL at all - lame):

http://www.zoneminder.com/forums/viewto ... or+monitor+

The video when watching it is still uber slow and I'm not sure where to start. It could be MySQL, it could be image processing, it could be any number of things. I don't think the shared mem is an issue and I'm just trying one camera. The shared mem is set as such:

kernel.shmall = 536870912
kernel.shmmax = 536870912

So there's plenty there. No swap is used. I checked vmstat and found the user cpu time was 80-90%...so top shows me 'zmc' is the culprit. I am starting to think a 700Mhz proc with 512MB of RAM isn't going to cut it for ZoneMinder and a single camera. Unless zmc is doing the writing to MySQL and the disk which I can offload and cut the processing down somehow (MySQL is only using .3 %), I don't think it's going to work for my application. I was hoping to get a single camera NVR type of setup going with something small and cheap. Next step up is a $200 mini PC since the Android sticks don't have a network card (though I might be able to use a hub and a USB to RJ45 dongle - stretch).

I am definitely open to ideas to get the Rasberry Pi + ZoneMinder + IP camera to go faster and be usable. It is a much more preferable solution.