Page 1 of 1

added camera to zm but no picture

Posted: Fri May 06, 2011 12:16 pm
by jonnexen
Hi guys,

I think I installed ZM like described in the documentation.. After that I've added some camera to the ZM interface. My problem now is that I can't see any picture when I click on the name of the cam. Also the events can't be shown in the browser...

What information do you need to help me?

Thanks!

Re: added camera to zm but no picture

Posted: Sat May 07, 2011 11:33 am
by PacoLM
Shared memory?

Run this script and change the settings to check if anything changes:

Code: Select all

#!/bin/sh
# Copyright (C) 2010 Chris "Pada" Kistner
# Modified by PacoLM to check only shared memory settings
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# NOTE: -f you find errors, check that coreutils are installed, if not, run the command below
# apt-get -y install coreutils bc

echo "--- Checking memory setting..."
page_size=$(getconf PAGE_SIZE)
mem_bytes=$(awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo)
mb=1048576
mem_bytes_mb=$(expr $mem_bytes / $mb)
shmmax=$(echo "$mem_bytes * 0.90" | bc | cut -f 1 -d '.')
shmmax_mb=$(expr $shmmax / $mb)
shmall=$(expr $mem_bytes / $page_size)
shmmax_cur=$(sysctl -n kernel.shmmax)
shmmax_cur_mb=$(expr $shmmax_cur / $mb)
shmall_cur=$(sysctl -n kernel.shmall)
echo "-- Total memory = $mem_bytes B = $mem_bytes_mb MB"
echo "-- Page size = $page_size B"
echo "-- Current kernel.shmmax = $shmmax_cur B = $shmmax_cur_mb MB"
echo "-- Current kernel.shmall = $shmall_cur pages"
if [ "$shmmax" -eq "$shmmax_cur" ] && [ "$shmall" -eq "$shmall_cur" ]; then
   echo "-- Recommended shm values already set"
else
   echo "-- Recommended: kernel.shmmax = $shmmax B = $shmmax_mb MB"
   echo "-- Recommended: kernel.shmall = $shmall pages"
fi
# Done
echo "--- Done."
You may have to edit your /etc/sysctl.conf and add the lines with the recommended values and then restart the computer or run sysctl -p.

Hope it helps, credits goes to the author of the script "Pada",

PacoLM

Re: added camera to zm but no picture

Posted: Sun May 08, 2011 1:16 am
by brycenesbitt
There is a typo in the script "kernel.shmmall" is misspelled.

Re: added camera to zm but no picture

Posted: Sun May 08, 2011 6:43 am
by mastertheknife
Or compile with mmap shared memory. this requires zero configuration and is the default option since 1.24.3.

Re: added camera to zm but no picture

Posted: Sun May 08, 2011 4:04 pm
by PacoLM
brycenesbitt wrote:There is a typo in the script "kernel.shmmall" is misspelled.
Yes, you're right, but the typo is in the echo command, so is not really important indeed.....Corrected anyway!

SOLVED Re: added camera to zm but no picture

Posted: Mon May 16, 2011 12:44 pm
by jonnexen
problem is solved now. there was some problem with the cgi-bin

thanks 4 your help!