I have installed ZM and its requirements, and I have been able to configure ZM through the perlscript and web-interface, which is working. Thing is, when i start ZM using "zmpkg.pl start", something starts, all right, but when i define a monitor and then want to "Start" the whole shebang in the webconsole, nothing happens. Still says "ZoneMinder Console - Stopped - v1.19.5"
I have been able to view input from my cameras through xawtv. Both /usr/local/zm and /srv/pub_web <-- ZMs webroot is owned by apache, who is also the --with-webuser.
Running cambozola from the server fails as well, in the watch-window I just get "http://IP/cgi-bin/zms?mode=jpeg&monitor ... &maxfps=15" where the applet should show.
Replies are appreciated.
The whole shebang of problems.
The whole shebang of problems.
Last edited by sgn on Mon Nov 29, 2004 2:20 pm, edited 2 times in total.
I have fixed the initial problems above, seems that apache was not allowed to write to /var/log/zm/, hence it died
Running into other problems now.
/var/log/zm/zmdc.log
"zmc -d 0" starts, reports started, then crashes, exit status 255.
/var/log/syslog
The "Failed to set window attributes" error of death.
Also, the video devices show up red in the console, however, i KNOW the user can access them, i have tried.
I am using LML LMLBT44 capture cards in PAL mode:
http://www.linuxmedialabs.com/product_d ... prodid=310
They are supposed to work with ZM, right? I have used resolutions up to PAL758x576, as LMLs site says it supports this resolution.
---------------------------------------------
Ok, now I have worked my way through these problems, I had to uncheck STRICT_CONFIG, then I had to up shmall and shmmax. Now all the logs spread harmony, however the video device in the console still shows up red, and I am unable to stream from it. Life is out to get me, it seems Applying state "Started" also fails, it just returns "ZoneMinder Console - Stopped - v1.19.5".
Any ideas?
Running into other problems now.
/var/log/zm/zmdc.log
"zmc -d 0" starts, reports started, then crashes, exit status 255.
/var/log/syslog
The "Failed to set window attributes" error of death.
Also, the video devices show up red in the console, however, i KNOW the user can access them, i have tried.
I am using LML LMLBT44 capture cards in PAL mode:
http://www.linuxmedialabs.com/product_d ... prodid=310
They are supposed to work with ZM, right? I have used resolutions up to PAL758x576, as LMLs site says it supports this resolution.
---------------------------------------------
Ok, now I have worked my way through these problems, I had to uncheck STRICT_CONFIG, then I had to up shmall and shmmax. Now all the logs spread harmony, however the video device in the console still shows up red, and I am unable to stream from it. Life is out to get me, it seems Applying state "Started" also fails, it just returns "ZoneMinder Console - Stopped - v1.19.5".
Any ideas?
Ok, I resolved that by disabling PHP Safe mode.
The state is now "Running", but trying to stream images from a "Monitor"-Monitor fails, just shows me the Cambozola Copyright.
The syslog is again whining about ERR: Failed to set window attributes, Invalid Argument. Even though ZM_STRICT is off, and I am using a PAL resolution of 758x576.
For some reason or another, ZM snagged an event. ONE event(!) before it walked out into the woods again. It was aonly filled by green frames, but hey! We are making progress.
Any ideas?
The state is now "Running", but trying to stream images from a "Monitor"-Monitor fails, just shows me the Cambozola Copyright.
The syslog is again whining about ERR: Failed to set window attributes, Invalid Argument. Even though ZM_STRICT is off, and I am using a PAL resolution of 758x576.
For some reason or another, ZM snagged an event. ONE event(!) before it walked out into the woods again. It was aonly filled by green frames, but hey! We are making progress.
Any ideas?
All the above has now been resolved.
However, right now I am extremely close to giving up, I have managed to get as far as none of the logs complaining abaout anything at all, alas, no cambozola-streaming from the server. Just the copyright-message.
After a few seconds another message is printed over the copyright text, "Failed to connect", or something. Live stills fail as well, seems to a problem with zms.
It DOES record, and i can view stills of old events, but thats about it
Does apache need any cgi-config for zms to work?
And should a 15 (640x480xYUV422@0.5 FPS) camera system consume 1GB RAM? With all cameras in record mode, that is?
Seems to be a memory leak somewhere, the amount of free memory gets lower and lower.
Also, how can I prevent zm from stashing shit in syslog and friends? I want to prevent a self-made DoS.
Video generation also fails, ffmpeg reports "Incorrect framerate" i zmvideo.log. ZM tried to start fgfmpeg with -r 0.0
However, right now I am extremely close to giving up, I have managed to get as far as none of the logs complaining abaout anything at all, alas, no cambozola-streaming from the server. Just the copyright-message.
After a few seconds another message is printed over the copyright text, "Failed to connect", or something. Live stills fail as well, seems to a problem with zms.
It DOES record, and i can view stills of old events, but thats about it
Does apache need any cgi-config for zms to work?
And should a 15 (640x480xYUV422@0.5 FPS) camera system consume 1GB RAM? With all cameras in record mode, that is?
Seems to be a memory leak somewhere, the amount of free memory gets lower and lower.
Also, how can I prevent zm from stashing shit in syslog and friends? I want to prevent a self-made DoS.
Video generation also fails, ffmpeg reports "Incorrect framerate" i zmvideo.log. ZM tried to start fgfmpeg with -r 0.0
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Hi,
Sorry to see you're having so much trouble.
or whatever path is valid for you. If that works then you know your web server is set up correctly. Then try using Mozilla or another browser that supports native streaming to access your streams without Cambozola (you may have to change your config if you've made it use it unconditionally). If the mode=jpeg&monitor=2&scale=100&maxfps=15 wget doesn't work then try using zms directly on the command line to make sure it has been compiled and installed correctly. So do something like
where you should see some output, though most will be binary crud.
Hope that helps a bit.
Phil,
Sorry to see you're having so much trouble.
There are a couple things worth trying here to isolate where the problem lies. I would get a terminal session up on your box, or another box on the network and dosgn wrote:alas, no cambozola-streaming from the server. Just the copyright-message.
After a few seconds another message is printed over the copyright text, "Failed to connect", or something. Live stills fail as well, seems to a problem with zms.
Code: Select all
wget -s -S 'http://IP/cgi-bin/zms?mode=jpeg&monitor=2&scale=100&maxfps=15' > wget.log
Code: Select all
export QUERY_STRING=mode=jpeg&monitor=2&scale=100&maxfps=15
<pathto>/zms > zms.log
I'm no apache expert so I don't know the details. It obviously needs to know where to look for cgi programs but I've never had to change that from the default settings so far.sgn wrote:Does apache need any cgi-config for zms to work?
The amount of memory, shared memory that is, used depends on the size and colour depth of your images multiplied by the buffer size you have set. So unless you've changed it in your case it will be 15 x 640 x 480 x 3 x 100. I think that comes to around 1.3Gb. If you aren't doing motion detection then you can easily set the ring buffer size to 25 or so instead of 100 which will knock your memory requirements down by 75%. You should restart your system after doing this to be on the safe side.sgn wrote:And should a 15 (640x480xYUV422@0.5 FPS) camera system consume 1GB RAM? With all cameras in record mode, that is?
As far as I know there are no leaks. There are various threads around as to why the vagaries of shared memory appear to indicate there is a leak but this is because shared memory is not accounted for until accessed and as the slots in the ring buffer gradually get poked the total apears to go up, until it reaches a high water mark which is roughly what the calculated figure indicates it should be.sgn wrote:Seems to be a memory leak somewhere, the amount of free memory gets lower and lower.
The rate it uses is calculated from the frame rate that an event was captured with. For some reason here it has calculated it as zero fps, without being able to see the frame data I can't say why. Also it's very difficult to give generic parameters that work for high and low frame rates so you will probably need to manually experiment with ffmpeg to see what works best for you and then add those parameters to the ZM config.sgn wrote:Also, how can I prevent zm from stashing shit in syslog and friends? I want to prevent a self-made DoS.[/quote"]
You can compile the applications to output less or no syslog info. Search for dbg_level for instructions on how to do this. You can also logrotate the other logs to keep them small. They don't get very big anyway.
sgn wrote:Video generation also fails, ffmpeg reports "Incorrect framerate" i zmvideo.log. ZM tried to start fgfmpeg with -r 0.0
Hope that helps a bit.
Phil,
Shared Memory
Whether they're in record mode or not, Phil's README for ZM has a formula in the troubleshooting section for calculating (shared!) memory needs. According to that and your camera specs, your cameras need XRES x YRES x CDEPTH x RBUFF x CAMERAS of memory. Assuming you have the default 100 image ring buffer and that you use the 16-bit (or 2-byte) YUV422 color palette you need: 640 x 480 x 2 x 100 x 15 = 921, 600, 000 bytes or ~879 MB. So you can either allow for greater shared memory use or decrease the resolution, ring buffer, or color depth of your cameras. For fun, I will discuss increasing the restrictions on shared memory.sgn wrote: And should a 15 (640x480xYUV422@0.5 FPS) camera system consume 1GB RAM? With all cameras in record mode, that is?
Most systems are set to use a default total of 128MB of SHM or Shared Memory. If you have enough RAM (1GB+ recommended if you have KDE desktop manager) then you can set your system to allow 128MB shared memory per process and 1GB shared mem total by doing the following as root:
Code: Select all
echo 134217728 >/proc/sys/kernel/shmmax
echo 262144 >/proc/sys/kernel/shmall
...
and the second number is 1024 x 1024 x 1024 / 4096 pages (i.e. 1GB / 4K page size).
You can set these numbers permanently in /etc/sysctl.conf by adding the lines:
Code: Select all
kernel.shmall = 262144
kernel.shmmax = 134217728
"The philosophy of one century is the common-sense of the next" - Henry Ward Beecher