<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clipo</id>
	<title>ZoneMinder Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Clipo"/>
	<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/Special:Contributions/Clipo"/>
	<updated>2026-04-19T17:43:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Ubuntu_Server_or_Desktop_Zoneminder_1.34.x&amp;diff=16606</id>
		<title>Ubuntu Server or Desktop Zoneminder 1.34.x</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Ubuntu_Server_or_Desktop_Zoneminder_1.34.x&amp;diff=16606"/>
		<updated>2021-04-15T08:46:34Z</updated>

		<summary type="html">&lt;p&gt;Clipo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Security Note: Prior version of my install procedure and install script contained  a &amp;quot;Fix Permissions: chown -R www-data:www-data /usr/share/zoneminder/&amp;quot; step. It has been brought to my attention that this could allow the www-data user to write inthis area which is not a good thing. To correct this on your system run: chown -R root:root /usr/share/zoneminder/&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: the same install procedure applies for server or desktop. Ubuntu 19.04 is not included as support for this release ends January 2020.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;A word of caution for upgraders. As of 22JAN20 the PPA/zoneminder-master, the development area, has versions of Zoneminder 1.34. If you were using the 1.33.x development version of Zoneminder and you apt update - apt upgrade without changing to PPA/zoneminder-1.34 you will get the next development version. Just be aware that it is possible some things may not work!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Also, these procedures are for a new Zoneminder install. Upgraders are encouraged to check the Zoneminder-1.34 Forum area for information.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Install Zoneminder 1.34.x on Ubuntu 20.04, 18.04 with shell script==&lt;br /&gt;
&lt;br /&gt;
This will install Zoneminder 1.34.x by using a shell script with one basic command (how easy is that!).&lt;br /&gt;
&lt;br /&gt;
You will need a Ubuntu 20.40 or 18.04 install with LAMP (Apache, Mariadb and PHP) installed desktop or server.&lt;br /&gt;
&lt;br /&gt;
As an alternate you may use MySQL in lieu of Mariadb but I find Mariadb easier to work with. &lt;br /&gt;
&lt;br /&gt;
Google is your friend if you need instructions for setting up a LAMP server. However, a simple LAMP can be installed with these commands:&lt;br /&gt;
&lt;br /&gt;
 apt install apache2 php mariadb-server php-mysql libapache2-mod-php&lt;br /&gt;
&lt;br /&gt;
Secure Mariadb, create root password et. al.&lt;br /&gt;
&lt;br /&gt;
 mysql_secure_installation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: As of 31MAR20 the iconnor PPA contains the install files for Focal Develpoment version, Ubuntu 20.04. I have tested this script on a server live install of Focal. Should work for you and I will keep up to date as Focal nears the release date.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Shell script file contents:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;This script installs Zoneminder 1.34.x on Ubuntu 20.04 or 18.04 with LAMP (MySQL or Mariadb) installed...&lt;br /&gt;
 Press Enter to continue or Ctrl + c to quit&amp;quot; nothing&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;You must be logged in as root using sudo su If you are installing on MySQL 8 perform the additional steps before continuing!&lt;br /&gt;
 Press Enter to continue or Ctrl + c to quit&amp;quot; nothing&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;Next we will add the PPA repository, install and configure the system to run Zoneminder. &lt;br /&gt;
 Press enter to continue&amp;quot; nothing&lt;br /&gt;
 apt install -y software-properties-common&lt;br /&gt;
 clear&lt;br /&gt;
 add-apt-repository ppa:iconnor/zoneminder-1.34&lt;br /&gt;
 apt update&lt;br /&gt;
 clear&lt;br /&gt;
 apt install -y zoneminder&lt;br /&gt;
 systemctl enable zoneminder&lt;br /&gt;
 service zoneminder start&lt;br /&gt;
 adduser www-data video&lt;br /&gt;
 a2enconf zoneminder&lt;br /&gt;
 a2enmod rewrite&lt;br /&gt;
 a2enmod headers&lt;br /&gt;
 a2enmod expires&lt;br /&gt;
 service apache2 reload&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;Install complete. Open Zoneminder/Options and set the timezine. Press enter to continue&amp;quot; nothing&lt;br /&gt;
 clear&lt;br /&gt;
&lt;br /&gt;
Copy the contents of the script, open a terminal and run:&lt;br /&gt;
&lt;br /&gt;
 nano zm-install&lt;br /&gt;
&lt;br /&gt;
Paste the contents of the script into Nano&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
Ctrl + o&lt;br /&gt;
Ctrl + x&lt;br /&gt;
&lt;br /&gt;
Next run:&lt;br /&gt;
&lt;br /&gt;
 chmod 755 zm-install&lt;br /&gt;
&lt;br /&gt;
Start the script by entering:&lt;br /&gt;
&lt;br /&gt;
 ./zm-install&lt;br /&gt;
&lt;br /&gt;
Follow the prompts. Things are pretty simple. The timezone is now set in Zoneminder/Options.&lt;br /&gt;
&lt;br /&gt;
Good Luck!&lt;br /&gt;
&lt;br /&gt;
===MySQL 8 - Additional Steps - Ubuntu 19.10 - Retained for reference===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;19MAY20 it has been verified with Ubuntu 20.04 with MySQL 8 and PHP 7.4 that the addition of &amp;quot;default_authentication_plugin = mysql_native_password&amp;quot; is not required. This was tested on a system that did not have the &amp;quot;VALIDATE PASSWORD COMPONENT&amp;quot; activated. This will be retained just-in-case someone still wants to install Zoneminder on Ubuntu 19.10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
MySQL 8 has added security measures that will have to be modified to run Zoneminder. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This procedure should be done before installing Zoneminder. However, I have done it before and after running the install. If done before installing Zoneminder you will see errors reported after the zm database is created. That&amp;#039;s OK as the error is the install package not creating the &amp;quot;zmuser&amp;quot; which what this procedure does. If you run this procedure after the install you will see the same error and additional error when the script tries to start Zoneminder. Just run this procedure and when done run &amp;quot;systemctl start zoneminder&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Secure MySQL if you haven&amp;#039;t already done it. Do not activate VALIDATE PASSWORD COMPONENT.&lt;br /&gt;
&lt;br /&gt;
 mysql_secure_installation&lt;br /&gt;
&lt;br /&gt;
Edit MySQL configuration to use native password&lt;br /&gt;
&lt;br /&gt;
 nano /etc/mysql/mysql.conf.d/mysqld.cnf&lt;br /&gt;
&lt;br /&gt;
Below [mysqld] add&lt;br /&gt;
&lt;br /&gt;
 default_authentication_plugin = mysql_native_password&lt;br /&gt;
&lt;br /&gt;
CTRL + o to save CTRL +x to exit&lt;br /&gt;
&lt;br /&gt;
Restart MySQL&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mysql&lt;br /&gt;
&lt;br /&gt;
Note: The Zoneminder package will not complete successfully and will show errors. This will be corrected in the next step.&lt;br /&gt;
&lt;br /&gt;
Create user and set permissions (press Enter after each entry)&lt;br /&gt;
&lt;br /&gt;
 mysql (Enter MySQL processing)&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;zmuser&amp;#039;@localhost IDENTIFIED WITH mysql_native_password BY &amp;#039;zmpass&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; GRANT ALL PRIVILEGES ON zm.* TO &amp;#039;zmuser&amp;#039;@&amp;#039;localhost&amp;#039; WITH GRANT OPTION;&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; FLUSH PRIVILEGES ;&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; \q&lt;br /&gt;
&lt;br /&gt;
Reload MySQL&lt;br /&gt;
&lt;br /&gt;
 mysqladmin -uroot -p reload&lt;br /&gt;
&lt;br /&gt;
You may now install Zoneminder&lt;br /&gt;
&lt;br /&gt;
==Install Zoneminder 1.34.x on Ubuntu 18.04 LEMP (NGNIX, Mariadb, PHP)==&lt;br /&gt;
&lt;br /&gt;
Thanks to &amp;quot;terdinglage&amp;quot; for the input to get this to work!&lt;br /&gt;
&lt;br /&gt;
While not tested this procedure should work on Ubuntu 19.10 using PHP 7.3 and Ubuntu 20.04 using PHP 7.4.&lt;br /&gt;
&lt;br /&gt;
Start with a basic Ubuntu 18.04 install. You can use a server or desktop install. Do not install LAMP!&lt;br /&gt;
&lt;br /&gt;
Become root&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
&lt;br /&gt;
Install Ngnix, Mariadb and PHP components&lt;br /&gt;
&lt;br /&gt;
 apt install nginx mariadb-server php-fpm php-mysql fcgiwrap&lt;br /&gt;
&lt;br /&gt;
Secure the Mariadb server&lt;br /&gt;
&lt;br /&gt;
 mysql_secure_installation&lt;br /&gt;
&lt;br /&gt;
Restart Mariadb&lt;br /&gt;
&lt;br /&gt;
 systemctl restart mysql&lt;br /&gt;
&lt;br /&gt;
Edit the php.ini file (Change the PHP version for Ubuntu 20.04!&lt;br /&gt;
&lt;br /&gt;
 nano /etc/php/7.2/fpm/php.ini&lt;br /&gt;
&lt;br /&gt;
Locate (Ctrl+w) cgi.fix_pathinfo=1 and change to&lt;br /&gt;
&lt;br /&gt;
 cgi.fix_pathinfo=0&lt;br /&gt;
&lt;br /&gt;
Remember to remove the leading ;&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit &lt;br /&gt;
&lt;br /&gt;
Restart php-fpm&lt;br /&gt;
&lt;br /&gt;
 systemctl restart php7.2-fpm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Repository&lt;br /&gt;
&lt;br /&gt;
NOTE:You may need to run: &amp;quot;apt install software-properties-common&amp;quot; if you did the minimal net install of Ubuntu.&lt;br /&gt;
&lt;br /&gt;
 add-apt-repository ppa:iconnor/zoneminder-1.34&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install Zoneminder&lt;br /&gt;
&lt;br /&gt;
 apt install zoneminder&lt;br /&gt;
&lt;br /&gt;
Create a new user if you plan to use local (USB or capture card) cameras.&lt;br /&gt;
&lt;br /&gt;
 adduser www-data video&lt;br /&gt;
&lt;br /&gt;
Change the ZM_PATH_ZMS in the 01-system-paths.conf file to /cgi-bin/nph-zms by dropping the /zm/ &lt;br /&gt;
&lt;br /&gt;
 nano /etc/zm/conf.d/01-system-paths.conf&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit &lt;br /&gt;
&lt;br /&gt;
Enable and start Zoneminder&lt;br /&gt;
&lt;br /&gt;
 systemctl enable zoneminder&lt;br /&gt;
&lt;br /&gt;
 service zoneminder start&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Edit the Ngnix default configuration. &lt;br /&gt;
&lt;br /&gt;
 nano /etc/nginx/sites-available/default&lt;br /&gt;
&lt;br /&gt;
Locate the line &amp;quot;index index.html index.htm index.nginx-debian.html;&amp;quot; and add index.php&lt;br /&gt;
&lt;br /&gt;
 index index.php index.html index.htm index.nginx-debian.html;&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;server&amp;quot; section after listen [::] :80 default_Server; add&lt;br /&gt;
&lt;br /&gt;
 include /etc/nginx/zoneminder.conf;&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit &lt;br /&gt;
&lt;br /&gt;
Create a Zoneminder conf file&lt;br /&gt;
&lt;br /&gt;
 nano /etc/nginx/zoneminder.conf&lt;br /&gt;
&lt;br /&gt;
Enter the following into the zoneminder.conf file (This file was improved by databoy2k)&lt;br /&gt;
Change &amp;quot;php7.2-fpm.sock&amp;quot; to &amp;quot;php7.4-fpm.sock&amp;quot; for Ubuntu 20.04.&lt;br /&gt;
&lt;br /&gt;
 location /cgi-bin {&lt;br /&gt;
 auth_basic off;&lt;br /&gt;
         alias /usr/lib/zoneminder/cgi-bin;     &lt;br /&gt;
         include fastcgi_params;&lt;br /&gt;
         fastcgi_param SCRIPT_FILENAME $request_filename;&lt;br /&gt;
         fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
         fastcgi_pass unix:/var/run/fcgiwrap.socket;&lt;br /&gt;
 }&lt;br /&gt;
 location /zm/cache {&lt;br /&gt;
 auth_basic off;&lt;br /&gt;
         alias /var/cache/zoneminder/cache;&lt;br /&gt;
 }&lt;br /&gt;
 location ~ /zm/api/(css|img|ico) {&lt;br /&gt;
 auth_basic off;&lt;br /&gt;
         rewrite ^/zm/api(.+)$ /api/app/webroot/$1 break;&lt;br /&gt;
         try_files $uri $uri/ =404;&lt;br /&gt;
 }&lt;br /&gt;
 location /zm {&lt;br /&gt;
 auth_basic off;&lt;br /&gt;
         alias /usr/share/zoneminder/www;&lt;br /&gt;
         try_files $uri $uri/ /index.php?$args =404;    &lt;br /&gt;
         location /zm/api {&lt;br /&gt;
 auth_basic off;&lt;br /&gt;
                 rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last;&lt;br /&gt;
          }&lt;br /&gt;
                 location ~ \.php$ {&lt;br /&gt;
                 auth_basic off;&lt;br /&gt;
                         include fastcgi_params;&lt;br /&gt;
                         fastcgi_param SCRIPT_FILENAME $request_filename;&lt;br /&gt;
                         fastcgi_param HTTP_PROXY &amp;quot;&amp;quot;;&lt;br /&gt;
                 fastcgi_index index.php;&lt;br /&gt;
                         fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit &lt;br /&gt;
&lt;br /&gt;
Restart Ngnix&lt;br /&gt;
&lt;br /&gt;
 service nginx restart&lt;br /&gt;
&lt;br /&gt;
Note: If Nginx gives you an error on restart go back one step and re-enter include /etc/ngnix/zoneminder.conf;&lt;br /&gt;
&lt;br /&gt;
Create or edit the fcgiwrap: &lt;br /&gt;
&lt;br /&gt;
 nano /etc/default/fcgiwrap&lt;br /&gt;
&lt;br /&gt;
and insert (with the number of children -c equal to the number of cameras) Note that you may need to have this value larger than the number if cameras. In my case I run &amp;quot;camera walls&amp;quot; from a custom web page that accesses the Zoneminder monitors. I have needed to increase the -c to include the number of cameras in the camera wall web pages.&lt;br /&gt;
&lt;br /&gt;
 DAEMON_OPTS=-c 10&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit &lt;br /&gt;
&lt;br /&gt;
then restart the fcgiwrap service.&lt;br /&gt;
&lt;br /&gt;
 systemctl restart fcgiwrap&lt;br /&gt;
&lt;br /&gt;
Open Zoneminder and under Options set your timezone.&lt;br /&gt;
&lt;br /&gt;
==Install Zoneminder 1.34.x on Ubuntu 16.04 with shell script==&lt;br /&gt;
&lt;br /&gt;
This will install Zoneminder by using a shell script with one basic command (how easy is that!).&lt;br /&gt;
&lt;br /&gt;
You will need a Ubuntu 16.04 install with LAMP (Apache, MySQL and PHP) installed desktop or server. As an alternate you may use Mariadb in lieu of MySQL&lt;br /&gt;
&lt;br /&gt;
Shell script file contents:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;This script installs Zoneminder 1.34.x on Ubuntu 16.04 with LAMP (MySQL or Mariadb) installed...&lt;br /&gt;
 Press Enter to continue or Ctrl + c to quit&amp;quot; nothing&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;You must be logged in as root using sudo su ...&lt;br /&gt;
 Press Enter to continue or Ctrl + c to quit&amp;quot; nothing&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;Next we will add two PPA repositorys, install and configure the system to run Zoneminder. You will have to press enter twice to load two PPA repositories.&lt;br /&gt;
 Press enter to continue&amp;quot; nothing&lt;br /&gt;
 apt install -y software-properties-common&lt;br /&gt;
 clear&lt;br /&gt;
 add-apt-repository ppa:iconnor/zoneminder-1.34&lt;br /&gt;
 apt update&lt;br /&gt;
 clear&lt;br /&gt;
 apt install -y zoneminder&lt;br /&gt;
 systemctl enable zoneminder&lt;br /&gt;
 service zoneminder start&lt;br /&gt;
 adduser www-data video&lt;br /&gt;
 a2enconf zoneminder&lt;br /&gt;
 a2enmod rewrite&lt;br /&gt;
 service apache2 reload&lt;br /&gt;
 clear&lt;br /&gt;
 read -p &amp;quot;Install complete. Open Zoneminder/Options and set timezone. Press enter to continue&amp;quot; nothing&lt;br /&gt;
 clear&lt;br /&gt;
&lt;br /&gt;
Copy the contents of the script, open a terminal and run:&lt;br /&gt;
&lt;br /&gt;
 nano zm-install&lt;br /&gt;
&lt;br /&gt;
Paste the contents of the script into Nano&lt;br /&gt;
&lt;br /&gt;
Then:&lt;br /&gt;
&lt;br /&gt;
Ctrl + o&lt;br /&gt;
Ctrl + x&lt;br /&gt;
&lt;br /&gt;
Next run:&lt;br /&gt;
&lt;br /&gt;
 chmod 755 zm-install&lt;br /&gt;
&lt;br /&gt;
Start the script by entering:&lt;br /&gt;
&lt;br /&gt;
 ./zm-install&lt;br /&gt;
&lt;br /&gt;
Follow the prompts. Things are pretty simple. Remember to open Zoneminder and set the timezone under options.&lt;br /&gt;
&lt;br /&gt;
Good Luck!&lt;br /&gt;
&lt;br /&gt;
==Zoneminder 1.34.x on Ubuntu Server 14.04==&lt;br /&gt;
&lt;br /&gt;
Note: While this install seems to work, 14.04 is old and you will have a better system with 18.04.&lt;br /&gt;
&lt;br /&gt;
Install Basic Server (if you used the mini.iso), OpenSSH Server, and LAMP Server&lt;br /&gt;
&lt;br /&gt;
Log in then become root:&lt;br /&gt;
&lt;br /&gt;
 sudo su&lt;br /&gt;
&lt;br /&gt;
Add the following two Repositories (if you get an error run: apt-get install software-properties-common)&lt;br /&gt;
&lt;br /&gt;
 add-apt-repository ppa:iconnor/zoneminder&lt;br /&gt;
 add-apt-repository ppa:iconnor/zoneminder-1.34&lt;br /&gt;
&lt;br /&gt;
Update Sources&lt;br /&gt;
&lt;br /&gt;
 apt-get update&lt;br /&gt;
&lt;br /&gt;
Install Zoneminder&lt;br /&gt;
&lt;br /&gt;
 apt-get install zoneminder&lt;br /&gt;
&lt;br /&gt;
Add delay to allow MySQL to start before Zoneminder&lt;br /&gt;
&lt;br /&gt;
 nano /etc/init.d/zoneminder&lt;br /&gt;
&lt;br /&gt;
Add sleep 15 after the existing &amp;quot;start() {&amp;quot; as shown:&lt;br /&gt;
&lt;br /&gt;
 start() {&lt;br /&gt;
      sleep 15&lt;br /&gt;
      echo -n &amp;quot;Starting $prog: &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Ctrl+o Enter to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new user&lt;br /&gt;
&lt;br /&gt;
 adduser www-data video&lt;br /&gt;
&lt;br /&gt;
Enable CGI, Zoneminder and rewrite configuration in Apache.&lt;br /&gt;
&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
 a2enconf zoneminder&lt;br /&gt;
&lt;br /&gt;
 a2enmod rewrite&lt;br /&gt;
&lt;br /&gt;
Start Zoneminder if needed (If you get an error Zoneminder is likely running already)&lt;br /&gt;
&lt;br /&gt;
 service zoneminder start&lt;br /&gt;
&lt;br /&gt;
Restart Apache&lt;br /&gt;
&lt;br /&gt;
 service apache2 reload&lt;br /&gt;
&lt;br /&gt;
Open Zoneminder and set timezone under Options&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Debian_13_Trixie_with_Zoneminder_1.36.35_or_Zoneminder_1.37.x&amp;diff=15689</id>
		<title>Debian 13 Trixie with Zoneminder 1.36.35 or Zoneminder 1.37.x</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Debian_13_Trixie_with_Zoneminder_1.36.35_or_Zoneminder_1.37.x&amp;diff=15689"/>
		<updated>2019-11-17T11:09:22Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Debian 10 Buster with Zoneminder 1.33.x from the ZM Master Repro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debian 10 Buster with Zoneminder 1.33.x from the ZM Master Repro==&lt;br /&gt;
&lt;br /&gt;
This install procedure was developed to use the Debian package developed by iconnor. This is from the Master development version of Zoneminder 1.33.x but is a bit more stable than Zoneminder 1.32.x version and, in my opinion, works better and is kept up to date better than Zoneminder on Debian repros.&lt;br /&gt;
&lt;br /&gt;
To begin, install Debian 10 (Buster) along with Apache2, PHP and your favorite database (Mariadb recommended).&lt;br /&gt;
&lt;br /&gt;
Add the repro&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Add the following line to the end of the file&lt;br /&gt;
&lt;br /&gt;
 deb https://zmrepo.zoneminder.com/debian/master buster/&lt;br /&gt;
&lt;br /&gt;
CTRL+o then [Enter] to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
Install the following and retrieve the key from the repro&lt;br /&gt;
&lt;br /&gt;
 sudo apt install apt-transport-https gnupg&lt;br /&gt;
&lt;br /&gt;
 wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important - Make sure the above &amp;quot;wget&amp;quot; process completes without error! If it does not complete you will not get the most recent Zoneminder version this procedure is written for.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 sudo apt update&lt;br /&gt;
&lt;br /&gt;
Install mariadb-server, apache and php&lt;br /&gt;
&lt;br /&gt;
 sudo apt install mariadb-server apache2 php&lt;br /&gt;
&lt;br /&gt;
Install Zoneminder&lt;br /&gt;
&lt;br /&gt;
 sudo apt install zoneminder&lt;br /&gt;
&lt;br /&gt;
If MySQL/MariaDB is not running during install run&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg-reconfigure zoneminder&lt;br /&gt;
&lt;br /&gt;
Enable Zoneminder&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable zoneminder.service&lt;br /&gt;
&lt;br /&gt;
Enable Apache Modules&lt;br /&gt;
&lt;br /&gt;
 sudo a2enconf zoneminder&lt;br /&gt;
 sudo a2enmod rewrite&lt;br /&gt;
 sudo a2enmod cgi &lt;br /&gt;
&lt;br /&gt;
Add your timezone to PHP&lt;br /&gt;
&lt;br /&gt;
Easy way&lt;br /&gt;
&lt;br /&gt;
 sed -i &amp;quot;s/;date.timezone =/date.timezone = $(sed &amp;#039;s/\//\\\//&amp;#039; /etc/timezone)/g&amp;quot; /etc/php/7.3/apache2/php.ini&lt;br /&gt;
&lt;br /&gt;
Long way&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/php/7.3/apache2/php.ini&lt;br /&gt;
&lt;br /&gt;
Search for [Date] (Ctrl + w then type Date and press Enter) and change date.timezone for your time zone. Don’t forget to remove the ; from in front of date.timezone.&lt;br /&gt;
&lt;br /&gt;
 [Date]&lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = America/New_York&lt;br /&gt;
&lt;br /&gt;
CTRL+o then [Enter] to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
Restart Apache and start Zoneminder&lt;br /&gt;
&lt;br /&gt;
 sudo service apache2 reload&lt;br /&gt;
 sudo systemctl start zoneminder&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Debian_13_Trixie_with_Zoneminder_1.36.35_or_Zoneminder_1.37.x&amp;diff=15668</id>
		<title>Debian 13 Trixie with Zoneminder 1.36.35 or Zoneminder 1.37.x</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Debian_13_Trixie_with_Zoneminder_1.36.35_or_Zoneminder_1.37.x&amp;diff=15668"/>
		<updated>2019-10-19T19:18:18Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Debian 10 Buster with Zoneminder 1.33.x from the ZM Master Repro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Debian 10 Buster with Zoneminder 1.33.x from the ZM Master Repro==&lt;br /&gt;
&lt;br /&gt;
This install procedure was developed to use the Debian package developed by iconnor. This is from the Master development version of Zoneminder 1.33.x but is a bit more stable than Zoneminder 1.32.x version and, in my opinion, works better and is kept up to date better than Zoneminder on Debian repros.&lt;br /&gt;
&lt;br /&gt;
To begin, install Debian 10 (Buster) along with Apache2, PHP and your favorite database (Mariadb recommended).&lt;br /&gt;
&lt;br /&gt;
Add the repro&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Add the following line to the end of the file&lt;br /&gt;
&lt;br /&gt;
 deb https://zmrepo.zoneminder.com/debian/master buster/&lt;br /&gt;
&lt;br /&gt;
CTRL+o then [Enter] to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
Install the following and retrieve the key from the repro&lt;br /&gt;
&lt;br /&gt;
 sudo apt install apt-transport-https gnupg&lt;br /&gt;
&lt;br /&gt;
 wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add -&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Important - Make sure the above &amp;quot;wget&amp;quot; process completes without error! If it does not complete you will not get the most recent Zoneminder version this procedure is written for.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
 sudo apt update&lt;br /&gt;
&lt;br /&gt;
Install Zoneminder&lt;br /&gt;
&lt;br /&gt;
 sudo apt install zoneminder&lt;br /&gt;
&lt;br /&gt;
If MySQL/MariaDB is not running during install run&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg-reconfigure zoneminder&lt;br /&gt;
&lt;br /&gt;
Enable Zoneminder&lt;br /&gt;
&lt;br /&gt;
 sudo systemctl enable zoneminder.service&lt;br /&gt;
&lt;br /&gt;
Enable Apache Modules&lt;br /&gt;
&lt;br /&gt;
 sudo a2enconf zoneminder&lt;br /&gt;
 sudo a2enmod rewrite&lt;br /&gt;
 sudo a2enmod cgi &lt;br /&gt;
&lt;br /&gt;
Add your timezone to PHP&lt;br /&gt;
&lt;br /&gt;
Easy way&lt;br /&gt;
&lt;br /&gt;
 sed -i &amp;quot;s/;date.timezone =/date.timezone = $(sed &amp;#039;s/\//\\\//&amp;#039; /etc/timezone)/g&amp;quot; /etc/php/7.3/apache2/php.ini&lt;br /&gt;
&lt;br /&gt;
Long way&lt;br /&gt;
&lt;br /&gt;
 sudo nano /etc/php/7.3/apache2/php.ini&lt;br /&gt;
&lt;br /&gt;
Search for [Date] (Ctrl + w then type Date and press Enter) and change date.timezone for your time zone. Don’t forget to remove the ; from in front of date.timezone.&lt;br /&gt;
&lt;br /&gt;
 [Date]&lt;br /&gt;
 ; Defines the default timezone used by the date functions&lt;br /&gt;
 ; http://php.net/date.timezone&lt;br /&gt;
 date.timezone = America/New_York&lt;br /&gt;
&lt;br /&gt;
CTRL+o then [Enter] to save&lt;br /&gt;
&lt;br /&gt;
CTRL+x to exit&lt;br /&gt;
&lt;br /&gt;
Restart Apache and start Zoneminder&lt;br /&gt;
&lt;br /&gt;
 sudo service apache2 reload&lt;br /&gt;
 sudo systemctl start zoneminder&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=6007</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=6007"/>
		<updated>2013-12-14T21:05:39Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* ZoneMinder 1.26.4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm bzip2 bzip2-devel bzip2-libs lbzip2&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
Since CentOS 6.4 CentOS now comes with libjpeg_turbo as the standard JPEG library leading to a more optimised Zoneminder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive with CentOS 6 ====&lt;br /&gt;
The default drive structure has chaned from that of CentOS 5 having the full drive allocated to the /root partition. CentOS 6 by default makes a logical volume &amp;#039;LVM&amp;#039; of 10% your drives space for the /root partition and the remaining drive as the /home partion with the exception of the swap and boot partitions.&lt;br /&gt;
&lt;br /&gt;
The will cause Zoneminder to fill the /root partition as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance if your system has been installed with the default partition structure.&lt;br /&gt;
&lt;br /&gt;
It is best to install CentOS 6 with a custom partition layout that is the same as CentOS 5 structure, you can also if using a single physical had drive do with out the LVM drives and create an EXT4 /root partion along with the standard /boot and /swap partitions.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Failed monitors or ZM refusing to start ====&lt;br /&gt;
A problem that took me some time to figure out on two installations was SElinux.&lt;br /&gt;
SElinux stops Zoneminder from accessing some system parts or doing some functions so will cause various errors or simply drive you nuts trying to figure out.&lt;br /&gt;
&lt;br /&gt;
Look at the following page on how to disable SElinux or use permissive mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the errors that I was getting with a fresh install on CentOS 6 was&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2013-02-16 16:13:10.828590	zmwatch	14898	ERR	Can&amp;#039;t open memory map file &amp;#039;/dev/shm/zm.mmap.1&amp;#039;: No such file or directory	zmwatch.pl	&lt;br /&gt;
2013-02-16 16:13:10.736988	zmfix	15317	ERR	Can&amp;#039;t stat /dev/video0: Permission denied	zmfix.cpp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== ZoneMinder 1.26.x ==&lt;br /&gt;
&lt;br /&gt;
Zoneminder after a long period of none development is now being developed by the community, these notes are to try and help with the installation of the new release on CentOS 5 and CentOS 6.&lt;br /&gt;
All testing has been done on a CentOS 6.4 fresh install server.&lt;br /&gt;
&lt;br /&gt;
=== Cmake installation notes ===&lt;br /&gt;
&lt;br /&gt;
Compiling of Zoneminder can now be done with the &amp;#039;Cmake&amp;#039; command in replacement of the ./configure command this should automatically configure the build with the minimum of parameters. The &amp;#039;Cmake&amp;#039; command at time of writing produced a partially working installation with the main files installed into /usr/local/bin/zoneminder and associated folders, different from the above guides.&lt;br /&gt;
&lt;br /&gt;
The webfiles require to be linked via a zoneminder.conf file located with in the /disto/redhat directory inside the build directory that requires to be coped to the /etc/httpd/conf.d directory, this will need to be edited to the correct location of the webfiles and remove the local only command as indicated with in the file.&lt;br /&gt;
&lt;br /&gt;
The Cmake install failed to use my BTTV capture card producing various errors with a potential solution given here &amp;lt;pre&amp;gt;http://www.zoneminder.com/forums/viewtopic.php?f=30&amp;amp;t=21709&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ./configure compile ===&lt;br /&gt;
&lt;br /&gt;
To install via the traditional ./configure method you first need to run the ./bootstrap.sh file to generate the required configure file, the install can then progress as the above installation guides.&lt;br /&gt;
&lt;br /&gt;
This method has produced a fully working installation at time of writing.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=6006</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=6006"/>
		<updated>2013-12-08T18:01:57Z</updated>

		<summary type="html">&lt;p&gt;Clipo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm bzip2 bzip2-devel bzip2-libs lbzip2&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
Since CentOS 6.4 CentOS now comes with libjpeg_turbo as the standard JPEG library leading to a more optimised Zoneminder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive with CentOS 6 ====&lt;br /&gt;
The default drive structure has chaned from that of CentOS 5 having the full drive allocated to the /root partition. CentOS 6 by default makes a logical volume &amp;#039;LVM&amp;#039; of 10% your drives space for the /root partition and the remaining drive as the /home partion with the exception of the swap and boot partitions.&lt;br /&gt;
&lt;br /&gt;
The will cause Zoneminder to fill the /root partition as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance if your system has been installed with the default partition structure.&lt;br /&gt;
&lt;br /&gt;
It is best to install CentOS 6 with a custom partition layout that is the same as CentOS 5 structure, you can also if using a single physical had drive do with out the LVM drives and create an EXT4 /root partion along with the standard /boot and /swap partitions.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Failed monitors or ZM refusing to start ====&lt;br /&gt;
A problem that took me some time to figure out on two installations was SElinux.&lt;br /&gt;
SElinux stops Zoneminder from accessing some system parts or doing some functions so will cause various errors or simply drive you nuts trying to figure out.&lt;br /&gt;
&lt;br /&gt;
Look at the following page on how to disable SElinux or use permissive mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the errors that I was getting with a fresh install on CentOS 6 was&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2013-02-16 16:13:10.828590	zmwatch	14898	ERR	Can&amp;#039;t open memory map file &amp;#039;/dev/shm/zm.mmap.1&amp;#039;: No such file or directory	zmwatch.pl	&lt;br /&gt;
2013-02-16 16:13:10.736988	zmfix	15317	ERR	Can&amp;#039;t stat /dev/video0: Permission denied	zmfix.cpp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
== ZoneMinder 1.26.4 ==&lt;br /&gt;
&lt;br /&gt;
Zoneminder after a long period of none development is now being developed by the community, these notes are to try and help with the installation of the new release on CentOS 5 and CentOS 6.&lt;br /&gt;
All testing has been done on a CentOS 6.4 fresh install server.&lt;br /&gt;
&lt;br /&gt;
=== Cmake installation notes ===&lt;br /&gt;
&lt;br /&gt;
Compiling of Zoneminder can now be done with the &amp;#039;Cmake&amp;#039; command in replacement of the ./configure command this should automatically configure the build with the minimum of parameters. The &amp;#039;Cmake&amp;#039; command at time of writing produced a partially working installation with the main files installed into /usr/local/bin/zoneminder and associated folders, different from the above guides.&lt;br /&gt;
&lt;br /&gt;
The webfiles require to be linked via a zoneminder.conf file located with in the /disto/redhat directory inside the build directory that requires to be coped to the /etc/httpd/conf.d directory, this will need to be edited to the correct location of the webfiles and remove the local only command as indicated with in the file.&lt;br /&gt;
&lt;br /&gt;
The Cmake install failed to use my BTTV capture card producing various errors with a potential solution given here &amp;lt;pre&amp;gt;http://www.zoneminder.com/forums/viewtopic.php?f=30&amp;amp;t=21709&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ./configure compile ===&lt;br /&gt;
&lt;br /&gt;
To install via the traditional ./configure method you first need to run the ./bootstrap.sh file to generate the required configure file, the install can then progress as the above installation guides.&lt;br /&gt;
&lt;br /&gt;
This method has produced a fully working installation at time of writing.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=5682</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=5682"/>
		<updated>2013-03-12T21:21:59Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, &amp;lt;tt&amp;gt;ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how many 4KB shared memory pages are available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;# cat /proc/sys/kernel/shmall&lt;br /&gt;
2097152&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In recent kernels the shmall is set to 2097152 memory pages multiplied by 4096 bytes per page for a total of 8 GB of shared memory available.  You only need to increase the shmall value if you have a computer with more than 8GB of memory and wish to use more of it for shared memory usage, such as large databases.&lt;br /&gt;
&lt;br /&gt;
The most shared memory bytes you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;# cat /proc/sys/kernel/shmmax&lt;br /&gt;
33554432&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In recent kernels the shmmax is set to 33554432 bytes for only 32 MB of maximum shared memory allocatable at a time, hardly enough for ZoneMinder to go above 320 x 240 x 24-bit resolution at 40 frames in the buffer if it is using the /dev/shm shared memory device, so this value needs to be increased.  If you are using ZoneMinder with the memory mapped (mmap) compile time option then this doesn&amp;#039;t affect you.&lt;br /&gt;
&lt;br /&gt;
To change the value to 128 MB temporarily during this kernel execution type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 536870912 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmmax = 536870912&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or if your distribution has the &amp;lt;tt&amp;gt;/etc/sysctl.d/&amp;lt;/tt&amp;gt; folder you can create a file in this folder without modifying the &amp;lt;tt&amp;gt;/etc/sysctl.d&amp;lt;/tt&amp;gt; so you won&amp;#039;t lose the changes during distro upgrades :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo kernel.shmmax = 536870912 &amp;gt;/etc/sysctl.d/60-kernel-shm.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full color, increase &amp;lt;tt&amp;gt;134217728&amp;lt;/tt&amp;gt; (128 MB) to, for example, &amp;lt;tt&amp;gt;268435456&amp;lt;/tt&amp;gt; (256 MB) and multiple this value by each camera.&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall = 8000x1024x1024/4096&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 2097152&amp;lt;/pre&amp;gt;&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmmax = 4294967296&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 2097152&lt;br /&gt;
kernel.shmmax = 4294967296&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Logging-&amp;gt;RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Logging-&amp;gt;RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
This function has from time to time been corrupted in the SVN release or in the stable releases, try and reinstall from a fresh download.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
CentOS 6.4 now has libjpeg-turbo built in as the default jpeg library allowing the best results out of the box.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command has been used to compile Zoneminder 1.25 on a CentOS 6.0 system, the native command should choose the processor automatically during compile time, this needs to be performed on the actual system!!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -O3 -march=native -mtune=native&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=native -mtune=native&amp;quot; ./configure  --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== When running configure I am getting a lot of messages about not being able to compile the ffmpeg libraries ===&lt;br /&gt;
&lt;br /&gt;
If you see output from configure that looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;checking libavcodec/avcodec.h usability... no&lt;br /&gt;
checking libavcodec/avcodec.h presence... yes&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h: present but cannot be compiled&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h:     check for missing&lt;br /&gt;
prerequisite headers?&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h: see the Autoconf documentation&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h:     section &amp;quot;Present But&lt;br /&gt;
Cannot Be Compiled&amp;quot;&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h: proceeding with the compiler&amp;#039;s&lt;br /&gt;
result&lt;br /&gt;
configure: WARNING:     ## ------------------------------------- ##&lt;br /&gt;
configure: WARNING:     ## Report this to support@zoneminder.com ##&lt;br /&gt;
configure: WARNING:     ## ------------------------------------- ##&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then it is caused not by the ZoneMinder build system but ffmpeg itself. However there is a workaround you can use which is to add&lt;br /&gt;
&lt;br /&gt;
  CPPFLAGS=-D__STDC_CONSTANT_MACROS&lt;br /&gt;
&lt;br /&gt;
to the ZoneMinder ./configure command which should solve the issue. However this is not a proper &amp;#039;fix&amp;#039; as such, which can only come from the ffmpeg project itself.&lt;br /&gt;
&lt;br /&gt;
=== I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * root /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * root /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perldoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This error some times happens when a linked camera looses its link or it is corrupted by the user or some other system event, try deleting the affected cameras and recreating them in the Zoneminder console.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5681</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5681"/>
		<updated>2013-03-12T21:16:04Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Trouble shooting full drive when in Modcord mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm bzip2 bzip2-devel bzip2-libs lbzip2&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
Since CentOS 6.4 CentOS now comes with libjpeg_turbo as the standard JPEG library leading to a more optimised Zoneminder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive with CentOS 6 ====&lt;br /&gt;
The default drive structure has chaned from that of CentOS 5 having the full drive allocated to the /root partition. CentOS 6 by default makes a logical volume &amp;#039;LVM&amp;#039; of 10% your drives space for the /root partition and the remaining drive as the /home partion with the exception of the swap and boot partitions.&lt;br /&gt;
&lt;br /&gt;
The will cause Zoneminder to fill the /root partition as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance if your system has been installed with the default partition structure.&lt;br /&gt;
&lt;br /&gt;
It is best to install CentOS 6 with a custom partition layout that is the same as CentOS 5 structure, you can also if using a single physical had drive do with out the LVM drives and create an EXT4 /root partion along with the standard /boot and /swap partitions.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Failed monitors or ZM refusing to start ====&lt;br /&gt;
A problem that took me some time to figure out on two installations was SElinux.&lt;br /&gt;
SElinux stops Zoneminder from accessing some system parts or doing some functions so will cause various errors or simply drive you nuts trying to figure out.&lt;br /&gt;
&lt;br /&gt;
Look at the following page on how to disable SElinux or use permissive mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the errors that I was getting with a fresh install on CentOS 6 was&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2013-02-16 16:13:10.828590	zmwatch	14898	ERR	Can&amp;#039;t open memory map file &amp;#039;/dev/shm/zm.mmap.1&amp;#039;: No such file or directory	zmwatch.pl	&lt;br /&gt;
2013-02-16 16:13:10.736988	zmfix	15317	ERR	Can&amp;#039;t stat /dev/video0: Permission denied	zmfix.cpp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5680</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5680"/>
		<updated>2013-03-12T19:11:31Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Install Zoneminder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm bzip2 bzip2-devel bzip2-libs lbzip2&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
Since CentOS 6.4 CentOS now comes with libjpeg_turbo as the standard JPEG library leading to a more optimised Zoneminder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive when in Modcord mode ====&lt;br /&gt;
Since CentOS 5 the default structure that the system install on to you hard disk has changed, they now make a logical volume of 10% your dives space for the /root drive and the remaining drive as /home with the exception of the swap drive.&lt;br /&gt;
The will cause Zoneminder to fill the /root drive very fast as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
==== Failed monitors or ZM refusing to start ====&lt;br /&gt;
A problem that took me some time to figure out on two installations was SElinux.&lt;br /&gt;
SElinux stops Zoneminder from accessing some system parts or doing some functions so will cause various errors or simply drive you nuts trying to figure out.&lt;br /&gt;
&lt;br /&gt;
Look at the following page on how to disable SElinux or use permissive mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the errors that I was getting with a fresh install on CentOS 6 was&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2013-02-16 16:13:10.828590	zmwatch	14898	ERR	Can&amp;#039;t open memory map file &amp;#039;/dev/shm/zm.mmap.1&amp;#039;: No such file or directory	zmwatch.pl	&lt;br /&gt;
2013-02-16 16:13:10.736988	zmfix	15317	ERR	Can&amp;#039;t stat /dev/video0: Permission denied	zmfix.cpp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5649</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5649"/>
		<updated>2013-02-16T16:37:50Z</updated>

		<summary type="html">&lt;p&gt;Clipo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm bzip2 bzip2-devel bzip2-libs lbzip2&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive when in Modcord mode ====&lt;br /&gt;
Since CentOS 5 the default structure that the system install on to you hard disk has changed, they now make a logical volume of 10% your dives space for the /root drive and the remaining drive as /home with the exception of the swap drive.&lt;br /&gt;
The will cause Zoneminder to fill the /root drive very fast as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
==== Failed monitors or ZM refusing to start ====&lt;br /&gt;
A problem that took me some time to figure out on two installations was SElinux.&lt;br /&gt;
SElinux stops Zoneminder from accessing some system parts or doing some functions so will cause various errors or simply drive you nuts trying to figure out.&lt;br /&gt;
&lt;br /&gt;
Look at the following page on how to disable SElinux or use permissive mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.centos.org/docs/5/html/5.2/Deployment_Guide/sec-sel-enable-disable.html&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the errors that I was getting with a fresh install on CentOS 6 was&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
2013-02-16 16:13:10.828590	zmwatch	14898	ERR	Can&amp;#039;t open memory map file &amp;#039;/dev/shm/zm.mmap.1&amp;#039;: No such file or directory	zmwatch.pl	&lt;br /&gt;
2013-02-16 16:13:10.736988	zmfix	15317	ERR	Can&amp;#039;t stat /dev/video0: Permission denied	zmfix.cpp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5569</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5569"/>
		<updated>2012-11-25T20:51:30Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Step Five - Installing ZoneMinder 1.25.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm bzip2 bzip2-devel bzip2-libs lbzip2&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive when in Modcord mode ====&lt;br /&gt;
Since CentOS 5 the default structure that the system install on to you hard disk has changed, they now make a logical volume of 10% your dives space for the /root drive and the remaining drive as /home with the exception of the swap drive.&lt;br /&gt;
The will cause Zoneminder to fill the /root drive very fast as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5495</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5495"/>
		<updated>2012-08-02T20:12:19Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* CentOS 6 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that runs only ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is to make the majority of system resources available to ZoneMinder, not the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. The CentOS base installation is very easy to install and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this article covers only two, because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root, in the /root directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system, then you can, but keep in mind that some items must run as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 (&amp;lt;b&amp;gt;Notes for using this guide with CentOS 6 are in chapter 2.&amp;lt;/b&amp;gt;) with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide, you will have to adjust file and directory names denoted below. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use, the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
On the first screen, un-check &amp;quot;Desktop - Gnome&amp;quot; then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom. (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Next&amp;quot; to continue&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection, un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish the installation.&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot, the setup screen should appear. If not, log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;quot;Firewall Configuration&amp;quot; and set the &amp;quot;Security Level&amp;quot; and &amp;quot;SELinux&amp;quot; to &amp;quot;Disabled.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next, we are going to disable a number of system services. Go back to the setup screen and select &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services, select &amp;quot;Disable Now and On Boot&amp;quot;, exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it enables you to resume (screen -r) right where you left off. Often times, I will start a large update/upgrade, leave it for the day, then come back and see where it&amp;#039;s at later. Screen allows you to do that without having to be connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First, we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files, ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point, it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After rebooting, log into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the latest &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
edit /etc/ld.so.conf and add the line &amp;quot;/usr/local/lib&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ldconfig -v&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line. Make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you&amp;#039;ll see something similar to this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next, we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, then jump into its directory.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some additional parameters. What is listed are the default CentOS directory locations.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note: It seems for Zoneminder to build with newer versions of ffmpeg, (certainly 0.6.3) you&amp;#039;ll need to append CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure, I get a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This descibes how you can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries and building Zoneminder with processor specific instructions.  &lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it, use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run the next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make ZoneMinder startup automatically after a reboot&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
*Make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note: You may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is to convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
To remove various configure/make errors in Centos 6.2, you may also want to install:&amp;lt;pre&amp;gt;&lt;br /&gt;
bzip2-libs ffmpeg-devel ffmpeg-php perl-Net-SFTP-Foreign perl-Expect perl-LWPx-ParanoidAgent.x86_64&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the correct RPM Forge repository is:&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i686 CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 6.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suggestion:&lt;br /&gt;
For Centos 6.2, I used the following configure string for success:&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=&amp;lt;zm user&amp;gt; ZM_DB_PASS=&amp;lt;zm user passwd&amp;gt; ZM_SSL_LIB=openssl  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; --with-ffmpeg=/usr/share/ffmpeg  CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Troubleshooting FFmpeg Errors Building ZoneMinder ====&lt;br /&gt;
Using the git version of FFmpeg can cause the ZoneMinder make process to fail with unresolved symbols in ffmpeg. To remedy this, use version 0.6.5 of FFmpeg with the same configure instructions as the normal install above.&lt;br /&gt;
FFmpeg 0.6.5: http://ffmpeg.org/releases/ffmpeg-0.6.5.tar.bz2&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive when in Modcord mode ====&lt;br /&gt;
Since CentOS 5 the default structure that the system install on to you hard disk has changed, they now make a logical volume of 10% your dives space for the /root drive and the remaining drive as /home with the exception of the swap drive.&lt;br /&gt;
The will cause Zoneminder to fill the /root drive very fast as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;br /&gt;
&lt;br /&gt;
[[Categories: Linux distributions]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5136</id>
		<title>CentOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=CentOS&amp;diff=5136"/>
		<updated>2012-02-07T18:19:31Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* CentOS 6 Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The intent of this walk through is to install a very base/bare bones installation of CentOS that will only run ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is so that the majority of system resources are available to ZoneMinder and not having to power the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent. CentOS is very easy to install the base installation and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but this will only cover two because they are related.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;All CLI operations/commands in this How-To are done as root in the user root&amp;#039;s directory. The reasoning is that this system would be in a secure environment to begin with. However, if you need to add a user to run these services to better secure the system then you can, but keep in mind that some items must be ran as root.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== CentOS 5.6 &amp;amp; ZoneMinder 1.25.0 ==&lt;br /&gt;
This guide is for CentOS v5.6 with ZoneMinder v1.25.0 which are the newest released versions as of this update (Summer 2011).  If you are attempting to install newer versions of either using this guide you will have to adjust file and directory names below. Notes for executing this guide in CentOS 6 are given in chapter 2. &lt;br /&gt;
&lt;br /&gt;
=== Step One - Get CentOS ===&lt;br /&gt;
You can download the “.iso” file(s) for CentOS from http://www.centos.org/&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively download the net-install version of CentOS which is basically just the first CD.&lt;br /&gt;
Here is one location to download the net-install version:&amp;lt;br/&amp;gt;&lt;br /&gt;
Download i386: http://mirror.chpc.utah.edu/pub/centos/5.6/isos/i386/CentOS-5.6-i386-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Download 64 bit: http://centos.cs.wisc.edu/pub/mirrors/linux/centos/5.6/isos/x86_64/CentOS-5.6-x86_64-netinstall.iso&amp;lt;br/&amp;gt;&lt;br /&gt;
Mirrors List: http://www.centos.org/mirrors/&lt;br /&gt;
&lt;br /&gt;
=== Step Two - Installation Source ===&lt;br /&gt;
Regardless of which method you use the next few steps are the same.&amp;lt;br/&amp;gt;&lt;br /&gt;
Begin by booting your system up with either cd/dvd.&amp;lt;br/&amp;gt;&lt;br /&gt;
Choose the options that best fit your environment until you reach the “Installation Method”. &lt;br /&gt;
&lt;br /&gt;
[[Image:centosnetinstal-http.png]]&lt;br /&gt;
&lt;br /&gt;
Choose &amp;#039;&amp;#039;&amp;#039;HTTP&amp;#039;&amp;#039;&amp;#039; ONLY if you are using the net-install method.  Otherwise, you probably want to choose &amp;#039;&amp;#039;&amp;#039;Local CDROM&amp;#039;&amp;#039;&amp;#039;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using the net-install method then enter:&amp;lt;br/&amp;gt;&lt;br /&gt;
Website Name: &amp;#039;&amp;#039;&amp;#039;mirror.centos.org&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for i386) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/i386&amp;#039;&amp;#039;&amp;#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
CentOS Directory: (for 64 bit) &amp;#039;&amp;#039;&amp;#039;/centos/5.6/os/x86_64&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Step Three - Installation Packages ===&lt;br /&gt;
The first screen you want to un-check &amp;quot;Desktop - Gnome&amp;quot; and then check &amp;quot;Server&amp;quot; (not Server-GUI)&amp;lt;br/&amp;gt;&lt;br /&gt;
Then Make sure that you have &amp;quot;Customize now&amp;quot; selected at the bottom (do not check &amp;quot;Packages from CentOS Extras&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-packages1.png]]&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Next&amp;quot; to continue on&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once presented with the custom package selection you need to un-check/check the following:&lt;br /&gt;
 Applications = Check only &amp;quot;Editors&amp;quot; and &amp;quot;Text Based Internet&amp;quot;&lt;br /&gt;
 Development = Check only &amp;quot;Development Libraries&amp;quot; and &amp;quot;Development Tools&amp;quot;&lt;br /&gt;
 Servers = Un-check everything&lt;br /&gt;
 Base System = Check only &amp;quot;Base&amp;quot; (you can check Administration Tools and System Tools if you need them, but they are not necessary)&lt;br /&gt;
&lt;br /&gt;
[[Image:Centosinstall-packages2.png]]&lt;br /&gt;
&lt;br /&gt;
Now let the system finish installing&lt;br /&gt;
&lt;br /&gt;
[[Image:centosisntall-end.png]]&lt;br /&gt;
&lt;br /&gt;
=== Step Four - Configuration ===&lt;br /&gt;
After the first reboot the setup screen should appear. If not then log into the system and type &amp;quot;setup&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup1.png]]&lt;br /&gt;
&lt;br /&gt;
Go into the &amp;quot;Firewall Configuration&amp;quot; disable the Security Level, and Disable SELinux&lt;br /&gt;
&lt;br /&gt;
[[Image:centosinstall-setup2.png]]&lt;br /&gt;
&lt;br /&gt;
Next we are going to disable a number of system services. Go back to the setup screen and go into &amp;quot;System Services&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
Un-Check:&lt;br /&gt;
 apmd&lt;br /&gt;
 bluetooth&lt;br /&gt;
 cups&lt;br /&gt;
 hidd&lt;br /&gt;
 ip6tables&lt;br /&gt;
 iptables&lt;br /&gt;
 netfs&lt;br /&gt;
 nfslock&lt;br /&gt;
 pcscd&lt;br /&gt;
 portmap&lt;br /&gt;
After disabling the services then select &amp;quot;Disable Now and On Boot&amp;quot;, then exit the setup tool, and log into the system if you haven&amp;#039;t already.&lt;br /&gt;
*Screen is a simple program that allows you to run commands from a &amp;quot;Hosted&amp;quot; command line interface. This helps if you loose your connection to the server for any reason in that it allows you to resume (screen -r) right where you left off. Often times I will start a large update/upgrade, leave it for the day, then come back and see where it is at later. Screen allows you to do that without having to be always connected.&lt;br /&gt;
*Install Screen&lt;br /&gt;
 yum install screen&lt;br /&gt;
*To start a screen session just type&lt;br /&gt;
 screen&lt;br /&gt;
*If you get disconnected and need to resume your session of screen simply type&lt;br /&gt;
 screen -r&lt;br /&gt;
&lt;br /&gt;
=== Step Five - Installing ZoneMinder 1.25.0 ===&lt;br /&gt;
First we need to download files and prepare the system&lt;br /&gt;
*Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later on without having to manually install them.&lt;br /&gt;
&amp;lt;pre&amp;gt;# For i386 CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm&lt;br /&gt;
&lt;br /&gt;
# For 64 bit CentOS 5.x run:&lt;br /&gt;
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Download the needed files ZoneMinder 1.25.0 and the Cambozola addon&lt;br /&gt;
 wget http://www2.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 wget http://www.zoneminder.com/sites/zoneminder.com/downloads/cambozola.jar&lt;br /&gt;
*Now let&amp;#039;s install all the services and programs that will be needed (&amp;#039;&amp;#039;If you encounter any dependency errors using yum, try running &amp;#039;&amp;#039;&amp;#039;yum clean all&amp;#039;&amp;#039;&amp;#039; and then re-try the install command(s).&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
*tip: Copy/paste two lines at a time&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc \&lt;br /&gt;
pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick&lt;br /&gt;
&lt;br /&gt;
yum -y install libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools \&lt;br /&gt;
perl-Date-Manip perl-LWP-UserAgent-Determined&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Sys-Mmap \&lt;br /&gt;
perl-Module-Load subversion git yasm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now let&amp;#039;s update everything within the new CentOS install&lt;br /&gt;
 yum -y update&lt;br /&gt;
*At this point it might be useful to reboot your system. Oddly, sometimes things don&amp;#039;t work right unless you reboot after all the updates&lt;br /&gt;
 reboot   -or-   shutdown -r now&lt;br /&gt;
*After reboot log back into your system&lt;br /&gt;
==== Install ffmpeg ====&lt;br /&gt;
*Now we need to make sure we use the lasted &amp;quot;tested&amp;quot; version of &amp;quot;ffmpeg&amp;quot;. This is the latest version of ffmpeg that the ZoneMinder developers have tested with.  Download, compile and install ffmpeg:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone git://git.videolan.org/ffmpeg.git&lt;br /&gt;
cd ffmpeg&lt;br /&gt;
./configure --enable-gpl --enable-shared --enable-pthreads&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The following commands must be done as &amp;#039;&amp;#039;&amp;#039;root&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make install &lt;br /&gt;
make install-libs&lt;br /&gt;
&lt;br /&gt;
cd /lib &amp;amp;&amp;amp; ln -s /usr/local/lib/libswscale.so.0 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libswresample.so.0 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavformat.so.52 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavcodec.so.52 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavutil.so.50 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavdevice.so.52 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavdevice.so.53 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavfilter.so.2 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavformat.so.53 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavcodec.so.53 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libpostproc.so.51 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libswscale.so.2 &amp;amp;&amp;amp; \&lt;br /&gt;
ln -s /usr/local/lib/libavutil.so.51&lt;br /&gt;
&lt;br /&gt;
ldconfig&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Next, run &amp;#039;ffmpeg&amp;#039; from the command line and make sure you do not get any errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;#039;ffmpeg&amp;#039; runs correctly, you will see something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ffmpeg version N-32260-gaebb56e, Copyright (c) 2000-2011 the FFmpeg developers&lt;br /&gt;
  built on Aug 31 2011 21:41:49 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)&lt;br /&gt;
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-pthreads&lt;br /&gt;
  libavutil    51. 14. 0 / 51. 14. 0&lt;br /&gt;
  libavcodec   53. 12. 0 / 53. 12. 0&lt;br /&gt;
  libavformat  53. 10. 0 / 53. 10. 0&lt;br /&gt;
  libavdevice  53.  3. 0 / 53.  3. 0&lt;br /&gt;
  libavfilter   2. 37. 0 /  2. 37. 0&lt;br /&gt;
  libswscale    2.  0. 0 /  2.  0. 0&lt;br /&gt;
  libpostproc  51.  2. 0 / 51.  2. 0&lt;br /&gt;
Hyper fast Audio and Video encoder&lt;br /&gt;
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...&lt;br /&gt;
&lt;br /&gt;
Use -h to get full help or, even better, run &amp;#039;man ffmpeg&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Enable services ====&lt;br /&gt;
*Turn everything on.  These commands must be run as root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 chkconfig httpd on &lt;br /&gt;
 chkconfig mysqld on &lt;br /&gt;
 chkconfig ntpd on &lt;br /&gt;
 service httpd start &lt;br /&gt;
 service mysqld start &lt;br /&gt;
 service ntpd start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Install Zoneminder ====&lt;br /&gt;
*Next we need to extract the contents of the ZoneMinder &amp;quot;tar&amp;quot; file, and then jump into its directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /root/  # Or your work directory for this installation&lt;br /&gt;
 tar -zxvf ZoneMinder-1.25.0.tar.gz&lt;br /&gt;
 cd ZoneMinder-1.25.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Now we are going to configure ZoneMinder with some added statements. What is listed are default CentOS directory placements.&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin&lt;br /&gt;
&lt;br /&gt;
Note that it seems for Zoneminder to build with newer versions of ffmpeg (certainly 0.6.3) you also need to append the CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot; to the end of the&lt;br /&gt;
./configure line thus:&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There is a section in the FAQ &amp;#039;&amp;#039;&amp;quot;When running configure I am getting a lot of messages about not being able to compile the ffmpeg libraries&amp;quot;&amp;#039;&amp;#039; about this [[http://www.zoneminder.com/wiki/index.php/FAQ]].&lt;br /&gt;
&lt;br /&gt;
Worth mentioning here also is the section in the FAQ under the heading &amp;quot;&amp;#039;&amp;#039;My load is too high, how can I reduce it?&amp;#039;&amp;#039;&amp;quot; [[http://www.zoneminder.com/wiki/index.php/FAQ]]. This details how one can possibly reduce CPU load by half by &lt;br /&gt;
changing the system&amp;#039;s jpeg libraries &amp;amp; building Zoneminder with processor specific instructions.  &lt;br /&gt;
&lt;br /&gt;
By default ZM_DB_HOST=localhost, ZM_DB_NAME=zm, ZM_DB_USER=zmuser, and ZM_DB_PASS=zmpass.&lt;br /&gt;
*Change &amp;quot;zmuser&amp;quot; (if you want) with the user that you will use within MySQL to access the ZoneMinder database&lt;br /&gt;
*Change &amp;quot;zmpass&amp;quot; with the password you will be using with the &amp;quot;zmuser&amp;quot; account&lt;br /&gt;
So if you wish to change it then use a command like:&lt;br /&gt;
 ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass&lt;br /&gt;
&lt;br /&gt;
*if you get the configure &amp;quot;error zm requires libmysqlclient.a&amp;quot; with 64 bit CentOS add the following to the end of your configure statement&lt;br /&gt;
  --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot;&lt;br /&gt;
&lt;br /&gt;
e.g. For CentOS 5.6 64-bit with support for ffmpeg.  The whole command must be executed on one line.  Make sure to change the &amp;#039;&amp;#039;&amp;#039;zmpass&amp;#039;&amp;#039;&amp;#039; to a password that matches your installation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass --with-extralibs=&amp;quot;-L/usr/lib64 -L/usr/lib64/mysql&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Run &amp;#039;&amp;#039;&amp;#039;make&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;make install&amp;#039;&amp;#039;&amp;#039; after running the configuration steps above.&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 # Run next command as root&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
==== Configure MySQL ====&lt;br /&gt;
*Need to add a password for the root user of MySQL&lt;br /&gt;
*Create the zm database&lt;br /&gt;
*Create the zm database user with permissions and password&lt;br /&gt;
 mysql&lt;br /&gt;
 mysql&amp;gt; SET PASSWORD FOR root@localhost=PASSWORD(&amp;#039;new_root_password&amp;#039;);&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.00 sec)&lt;br /&gt;
 mysql&amp;gt; create database zm;&lt;br /&gt;
&amp;gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; CREATE USER &amp;#039;your_zm_user&amp;#039;@&amp;#039;localhost&amp;#039; IDENTIFIED BY &amp;#039;your_zm_password_from_above&amp;#039;;&lt;br /&gt;
Query OK, 0 rows affected (0.01 sec)&lt;br /&gt;
 mysql&amp;gt; grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;&lt;br /&gt;
&amp;gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt;
 mysql&amp;gt; exit&lt;br /&gt;
&amp;gt;Bye&lt;br /&gt;
*Import the tables into the zm database&lt;br /&gt;
 cd /root/ZoneMinder-1.25.0 &lt;br /&gt;
 mysql -u root -p zm &amp;lt; db/zm_create.sql&lt;br /&gt;
&lt;br /&gt;
==== Finalize Installation of ZoneMinder ====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;All remaining CLI commands need to be run as root.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Make it so that ZoneMinder will startup automatically when the system is rebooted&lt;br /&gt;
 # from the ZoneMinder-1.25 source directory&lt;br /&gt;
 cp scripts/zm /etc/init.d/&lt;br /&gt;
 chmod +x /etc/init.d/zm&lt;br /&gt;
 chkconfig zm on&lt;br /&gt;
*Add the Cambozola Java web interface&lt;br /&gt;
 cp cambozola.jar /var/www/html/zm/&lt;br /&gt;
* and make sure you have permission to view it from apache:&lt;br /&gt;
 chown apache:apache /var/www/html/zm/cambozola.jar&lt;br /&gt;
*Start ZoneMinder&lt;br /&gt;
 service zm start&lt;br /&gt;
&lt;br /&gt;
Note that you may get an error when you try to start Zoneminder using the &amp;#039;zm&amp;#039; startup script as per this forum post: [[http://www.zoneminder.com/forums/viewtopic.php?f=21&amp;amp;t=17827]] .&lt;br /&gt;
The reason for this was because the default &amp;#039;zm&amp;#039; startup script was formatted with DOS line endings. If you get the errors as detailed in the above post then the fix is convert the &lt;br /&gt;
&amp;#039;zm&amp;#039; file to use UNIX style line endings. You can do this in the Vim text editor whilst editing the &amp;#039;zm&amp;#039; file thus: &amp;#039;:set fileformat=unix&amp;#039; then save the file &amp;#039;:wq&amp;#039;. You can also &lt;br /&gt;
use the utility dos2unix to convert the file. &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm (Options-&amp;gt;Images&amp;amp;nbsp;tab-&amp;gt;OPT_CAMBOZOLA)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now have fun and add your cameras to ZoneMinder knowing that you now have a very stable and streamlined OS to run it on.&lt;br /&gt;
&lt;br /&gt;
== CentOS 6 Notes ==&lt;br /&gt;
&lt;br /&gt;
The installation for CentOS 6 is pretty much the same.&lt;br /&gt;
Download CentOS 6 minimal installation ISO (CentOS-6.0-i386-minimal.iso – 257MB).  Burn to CD and install. We only want to be running in console text mode not GUI graphics mode. During installation configure network and tick to enable network adapter.&lt;br /&gt;
* Login as root and update the base install:&lt;br /&gt;
&amp;lt;pre&amp;gt;yum -y update&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Install required packages, other useful packages, and their dependencies&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
yum groupinstall core&lt;br /&gt;
yum groupinstall base&lt;br /&gt;
yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring \&lt;br /&gt;
nano tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver \&lt;br /&gt;
sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel subversion nano kernel-devel \&lt;br /&gt;
bison-devel ncurses zlib zlib-devel openssl openssl-devel gnutls-devel php-process perl-Time-HiRes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Now we continue from step four (4).&lt;br /&gt;
==== Installation of ZoneMinder ====&lt;br /&gt;
* In step five (5) the command that seems to configure zoneminder correctly is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CXXFLAGS=-D__STDC_CONSTANT_MACROS ./configure --with-webdir=/var/www/html/zm \&lt;br /&gt;
 --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache \&lt;br /&gt;
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_userZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Troubleshooting Blank Page ====&lt;br /&gt;
If everything went ok but when accessing zoneminder&amp;#039;s web page at http://localhost/zm, the page is blank this means that there is a problem with PHP short tags. Edit setting short_open_tag in php.ini (/etc/php.ini) and change it to On.&lt;br /&gt;
* Restart apache server with:&lt;br /&gt;
&amp;lt;pre&amp;gt;service httpd restart&amp;lt;/pre&amp;gt; and you should be up and running.&lt;br /&gt;
==== Trouble shooting full drive when in Modcord mode ====&lt;br /&gt;
Since CentOS 5 the default structure that the system install on to you hard disk has changed, they now make a logical volume of 10% your dives space for the /root drive and the remaining drive as /home with the exception of the swap drive.&lt;br /&gt;
The will cause Zoneminder to fill the /root drive very fast as the /var/www/html/zm/events directory is by default located here, you can use the system-config-lvm utility to re-adjust this partition balance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[== &amp;#039;&amp;#039;&amp;#039;P.S.&amp;#039;&amp;#039;&amp;#039; ==]] aspcicc@jumpy.it&lt;br /&gt;
(Update: This does not appear to be required any more.)&lt;br /&gt;
&lt;br /&gt;
Hi! and thanks for your guide.. i want to add a little correction that have made me crazy to resolve, when I poweroff or reboot system i obtain an error related to mysql database and i have    understood that the problem was because mysqld is stopped before zoneminder to be more specific there isn&amp;#039;t a link under rc0.d (halt) and rc6.d (reboot) to zoneminder that for this lack is simply killed by killall. To resolve this problem you need to add at the start of zm (under /etc/init.d) the line&lt;br /&gt;
&lt;br /&gt;
 &amp;#039; # chkconfig: 345 99 01 &amp;#039;  (without &amp;#039; of course)&lt;br /&gt;
&lt;br /&gt;
and then run &lt;br /&gt;
chkconfig --level 345 zm on&lt;br /&gt;
chkconfig --level 06 zm off&lt;br /&gt;
&lt;br /&gt;
So the link to shutdown zm is created under rc0.d and rc6.d and zoneminder is started at the end of poweron and stopped at the beginning of the poweroff&lt;br /&gt;
&lt;br /&gt;
For information about priority starting and stopping processes see: http://www.netadmintools.com/art94.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Added Dependency: ImageMagick&lt;br /&gt;
&lt;br /&gt;
Removed Dependency: perl-Time-HiRes, which causes a conflict with the default perl package.&lt;br /&gt;
&lt;br /&gt;
Also, mysql seems to install with no password for the root user, and the zm DB create script creates the database on the fly, which means that the database create command needs to have the &amp;quot;-p zm&amp;quot; removed from the command line.&lt;br /&gt;
&lt;br /&gt;
Could someone verify that this is correct, to make sure it&amp;#039;s not just something I missed?&lt;br /&gt;
&lt;br /&gt;
Thanks! &lt;br /&gt;
terry@cnysupport.com&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Struggling to get x264 and ffmpeg working?  I used the latest SVN versions not the Centos packages.  But I was getting&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;ffmpeg: error while loading shared libraries: libavdevice.so.53: cannot open shared object file: No such file or directory&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I followed these instructions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /etc/ld.so.conf.d&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* add another file:  custom-libs.conf&lt;br /&gt;
* inside, put :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;/usr/local/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* save the file&lt;br /&gt;
* run ldconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;ldconfig&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BeeryGaz&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4900</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4900"/>
		<updated>2011-12-08T20:05:29Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, &amp;lt;tt&amp;gt;ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how many 4KB shared memory pages are available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;# cat /proc/sys/kernel/shmall&lt;br /&gt;
2097152&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In recent kernels the shmall is set to 2097152 memory pages multiplied by 4096 bytes per page for a total of 8 GB of shared memory available.  You only need to increase the shmall value if you have a computer with more than 8GB of memory and wish to use more of it for shared memory usage, such as large databases.&lt;br /&gt;
&lt;br /&gt;
The most shared memory bytes you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;# cat /proc/sys/kernel/shmmax&lt;br /&gt;
33554432&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In recent kernels the shmmax is set to 3354432 bytes for only 32 MB of maximum shared memory allocatable at a time, hardly enough for ZoneMinder to go above 320 x 240 x 24-bit resolution at 40 frames in the buffer if it is using the /dev/shm shared memory device, so this value needs to be increased.  If you are using ZoneMinder with the memory mapped (mmap) compile time option then this doesn&amp;#039;t affect you.&lt;br /&gt;
&lt;br /&gt;
To change the value to 128 MB temporarily during this kernel execution type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 536870912 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmmax = 536870912&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or if your distribution has the &amp;lt;tt&amp;gt;/etc/sysctl.d/&amp;lt;/tt&amp;gt; folder you can create a file in this folder without modifying the &amp;lt;tt&amp;gt;/etc/sysctl.d&amp;lt;/tt&amp;gt; so you won&amp;#039;t lose the changes during distro upgrades :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo kernel.shmmax = 536870912 &amp;gt;/etc/sysctl.d/60-kernel-shm.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full color, increase &amp;lt;tt&amp;gt;134217728&amp;lt;/tt&amp;gt; (128 MB) to, for example, &amp;lt;tt&amp;gt;268435456&amp;lt;/tt&amp;gt; (256 MB) and multiple this value by each camera.&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall = 8000x1024x1024/4096&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 2097152&amp;lt;/pre&amp;gt;&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmmax = 4294967296&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 2097152&lt;br /&gt;
kernel.shmmax = 4294967296&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
This function has from time to time been corrupted in the SVN release or in the stable releases, try and reinstall from a fresh download.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following command has been used to compile Zoneminder 1.25 on a CentOS 6.0 system, the native command should choose the processor automatically during compile time, this needs to be performed on the actual system!!.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -O3 -march=native -mtune=native&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=native -mtune=native&amp;quot; ./configure  --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== When running configure I am getting a lot of messages about not being able to compile the ffmpeg libraries ===&lt;br /&gt;
&lt;br /&gt;
If you see output from configure that looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;checking libavcodec/avcodec.h usability... no&lt;br /&gt;
checking libavcodec/avcodec.h presence... yes&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h: present but cannot be compiled&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h:     check for missing&lt;br /&gt;
prerequisite headers?&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h: see the Autoconf documentation&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h:     section &amp;quot;Present But&lt;br /&gt;
Cannot Be Compiled&amp;quot;&lt;br /&gt;
configure: WARNING: libavcodec/avcodec.h: proceeding with the compiler&amp;#039;s&lt;br /&gt;
result&lt;br /&gt;
configure: WARNING:     ## ------------------------------------- ##&lt;br /&gt;
configure: WARNING:     ## Report this to support@zoneminder.com ##&lt;br /&gt;
configure: WARNING:     ## ------------------------------------- ##&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then it is caused not by the ZoneMinder build system but ffmpeg itself. However there is a workaround you can use which is to add&lt;br /&gt;
&lt;br /&gt;
  CPPFLAGS=-D__STDC_CONSTANT_MACROS&lt;br /&gt;
&lt;br /&gt;
to the ZoneMinder ./configure command which should solve the issue. However this is not a proper &amp;#039;fix&amp;#039; as such, which can only come from the ffmpeg project itself.&lt;br /&gt;
&lt;br /&gt;
=== I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This error some times happens when a linked camera looses its link or it is corrupted by the user or some other system event, try deleting the affected cameras and recreating them in the Zoneminder console.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Beginner_hardware&amp;diff=4310</id>
		<title>Beginner hardware</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Beginner_hardware&amp;diff=4310"/>
		<updated>2011-03-17T20:33:42Z</updated>

		<summary type="html">&lt;p&gt;Clipo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Option 1==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The best, first advice is to check that your camera is compatible with zoneminder&amp;#039;s motion JPEG (MJPEG). &lt;br /&gt;
&lt;br /&gt;
You should read the [[Documentation]].  The developers spent and continue to spend a great deal of time writing it... you should spend at least a little time reading it.  Specifically,  read the part about shared memory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Recommended IP cameras&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Axis]] brand cameras are a good choice, but expensive.&lt;br /&gt;
&lt;br /&gt;
[[BSIT]] are really cheap but also not the greatest quality.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Camera quality varies greatly, both in actual image quality and in operational reliability.  Remember that you often &amp;quot;get what you pay for.&amp;quot;  Cameras from high volume manufacturers may be subject to software/hardware compromises that lower cost at the risk of breaking functionality and/or compatibility with standards. &lt;br /&gt;
&lt;br /&gt;
Avoid cameras that require 1.24(aka: mpeg video)  because it make things harder for beginners. &lt;br /&gt;
&lt;br /&gt;
One place to buy cameras:&lt;br /&gt;
&lt;br /&gt;
http://store.bluecherry.net/category_s/95.htm&lt;br /&gt;
&lt;br /&gt;
==Option 2==&lt;br /&gt;
&lt;br /&gt;
The best beginners hardware and setup is to use an old unused system, anything from late Pentium 3 or Athlon XP generation of cpus will be more than enough for a setup capable of running 2 or 3 cameras depending on configuration.&lt;br /&gt;
&lt;br /&gt;
You will need one of the cheap pci cctv capture cards from Ebay that use the bt878 chip, if you search for pci cctv on ebay then most of the cheap cards that show up will be a card of this type, see the [[Pico2000]] section of the Zoneminder wiki for a few photos of these cards and a little more technical information.&lt;br /&gt;
&lt;br /&gt;
You can alternatively buy them and better boards from the retailers in the [[shop]] section of this webpage.&lt;br /&gt;
&lt;br /&gt;
You will need to configure the capture card as described in the [[Pico2000]] wiki&lt;br /&gt;
&lt;br /&gt;
Next source some standard analogue cameras from the retailers listed on this page or any other source you like.&lt;br /&gt;
&lt;br /&gt;
Install Zoneminder using the [[CentOS]] guide contained in the wiki or any other distro guide you are happy with, I personally started with the CentOS guide and it has worked well for me.&lt;br /&gt;
&lt;br /&gt;
Configure and then you&amp;#039;re running!!!.&lt;br /&gt;
&lt;br /&gt;
This is of course a beginners system and so can be expanded and improved on once you are happy, my aim in this design is to build a Zoneminder system as cheaply and basic as possible, I have made a lots of setups that are still operating on the above basis.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Hardware_Compatibility_List&amp;diff=4309</id>
		<title>Hardware Compatibility List</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Hardware_Compatibility_List&amp;diff=4309"/>
		<updated>2011-03-17T08:08:23Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* bt8x8 Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zoneminder will work with almost any capture card that is supported by the linux kernel.  You may find additional details about supported hardware in the [http://www.zoneminder.com/forums/viewforum.php?f=10  Hardware Compatibility List] part of the forums.  Also if you find something in the forums that is  missing from the wiki ADD IT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Capture Cards ==&lt;br /&gt;
&lt;br /&gt;
[[Anykeeper]] &lt;br /&gt;
&lt;br /&gt;
[[Avermedia]]&lt;br /&gt;
&lt;br /&gt;
[[Camsecure PCI Express video capture]]&lt;br /&gt;
&lt;br /&gt;
[[Digiflower]]&lt;br /&gt;
&lt;br /&gt;
[[Grandtec Grand X Guard]] [http://www.grandtec.com/products/surveillance/xguard.html]&lt;br /&gt;
&lt;br /&gt;
[[Hauppauge]]&lt;br /&gt;
&lt;br /&gt;
[[Ituner Spectra 8]] [http://www.ituner.com/spectra.htm]&lt;br /&gt;
&lt;br /&gt;
[[Kodicom 4400r]]&lt;br /&gt;
&lt;br /&gt;
[[Kodicom 8800]]&lt;br /&gt;
&lt;br /&gt;
[[Tungson TE-8008]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Leadtek WinFast VC 100 - the cheapest bt878 model with no tuner on it, just Com/Svideo in.&lt;br /&gt;
&lt;br /&gt;
[[Linux Media Labs LMLBT44]] [http://www.linuxmedialabs.com]&lt;br /&gt;
&lt;br /&gt;
[[Osprey 100]]&lt;br /&gt;
&lt;br /&gt;
[[Provideo PV- series (Bluecherry)]] [http://store.bluecherry.net/SearchResults.asp?Cat=63&amp;amp;Click=51]&lt;br /&gt;
&lt;br /&gt;
[[TView 95/99]]&lt;br /&gt;
&lt;br /&gt;
[[Videocards with Philips saa7134 chipset]]&lt;br /&gt;
&lt;br /&gt;
[[WinFast TV2000 XP]]&lt;br /&gt;
&lt;br /&gt;
[[Rapid OS]]&lt;br /&gt;
&lt;br /&gt;
== bt8x8 Cards ==&lt;br /&gt;
A note on the bt8x8-based TV-tuner cards: these usually have beside the tuner input, also a Composite and an S-Video input. You can hook up 2 analog cameras to these, and access from ZoneMinder both of them as individual cameras, at max 15Fps. You don&amp;#039;t need two separate TV cards for two cameras!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Pico2000]] - 4 port card, one chip bt878, around 2 fps when using all channels&lt;br /&gt;
&lt;br /&gt;
[[Bt878_4chip_8inputs]] -4 chips bt878, 8 inputs, around 5 fps when using 2 inputs per chip&lt;br /&gt;
&lt;br /&gt;
[[:Image:Karta.jpg| bt878 8 chip 8 input]] - This card is supplied with D-sub to 8 BNC connector and uses the bt878 chip for each input allowing full frame rates and quality. See [[Kodicom 8800]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most other BTTV (bt878, bt848) cards, see /usr/src/linux/Documentation/video4linux/bttv/CARDLIST on your system for a list of some of them.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Analog Cameras ==&lt;br /&gt;
&lt;br /&gt;
Any regular composite or S-video camera connected via a supported capture card.  Some analog cameras feature camera control - ZM supports several of these camera&amp;#039;s Pan/Tilt/Zoom functions via serial port control, as well as camera Presets, Focus, Iris, etc.&lt;br /&gt;
*[[PicturetelControlScript | PictureTel PTZ2N]].&lt;br /&gt;
&lt;br /&gt;
== Network Cameras ==&lt;br /&gt;
For Network Cams to work they need to be able to stream MJPEG without the requirement of activex controls. If you see the requirement for the camera calls for IE then there is a good chance it may not work. The other option is to grab JPEG images if the camera supports that option which will work but at a lower frame rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any network camera that allows access to single JPEG image grabs or &amp;#039;&amp;#039;&amp;#039;some but not all&amp;#039;&amp;#039;&amp;#039; multi-part JPEG feeds.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Full Compatibility &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [[Abus]]  some&lt;br /&gt;
&lt;br /&gt;
* [[Airlink 101]] some &lt;br /&gt;
&lt;br /&gt;
* [[Axis]] All&lt;br /&gt;
&lt;br /&gt;
* [[Astak Mole]] Some&lt;br /&gt;
&lt;br /&gt;
* [[BSTI]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Cisco]] some&lt;br /&gt;
&lt;br /&gt;
* [[D-Link]] Most&lt;br /&gt;
&lt;br /&gt;
* [[Foscam]] (FI8908W, FI8904W, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Gadspot]] Most&lt;br /&gt;
&lt;br /&gt;
* [[hootoo]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Instar]] (IN-2905, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Level One]] some&lt;br /&gt;
&lt;br /&gt;
* [[Linksys]] WVC-210 / WVC2300 / PVC2300 / WVC54GC&lt;br /&gt;
&lt;br /&gt;
* [[Maygion]] (IP-603, IP-604, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Rimax]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Sony]] Most&lt;br /&gt;
&lt;br /&gt;
* TP-LINK [[TLSC-3000]]&lt;br /&gt;
&lt;br /&gt;
* [[Trendnet]] Most&lt;br /&gt;
&lt;br /&gt;
* [[Y-Cam]] (Sharx Ip) Most&lt;br /&gt;
&lt;br /&gt;
* [[Zavio]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Iguard]] IP390E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Remote systems, themselves running zoneminder, can be accessed as cameras using the Remote Path of &amp;#039;&amp;#039;&amp;#039;/cgi-bin/nph-zms?mode=single&amp;amp;monitor=1&amp;amp;scale=100&amp;amp;maxfps=5&amp;amp;buffer=1000&amp;#039;&amp;#039;&amp;#039; - where the monitor number is the correct camera on the remote system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Single Jpeg Only&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [[Airlink 101]] some&lt;br /&gt;
&lt;br /&gt;
* [[JVC]] some&lt;br /&gt;
&lt;br /&gt;
* [[Panasonic]] some&lt;br /&gt;
&lt;br /&gt;
* PLANET some&lt;br /&gt;
&lt;br /&gt;
*[[Toshiba]] some&lt;br /&gt;
&lt;br /&gt;
* [[Veo Observer IP NetCam]] most&lt;br /&gt;
&lt;br /&gt;
*[[Vivotek]] All&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Mpeg(ver1.24.0 and up)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*[[ABS_MegaCam]]&lt;br /&gt;
&lt;br /&gt;
* [[Axis]] All&lt;br /&gt;
&lt;br /&gt;
* [[ ACTi]] All&lt;br /&gt;
&lt;br /&gt;
*[[Vivotek]] Most&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Compatible with modifications&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*[[Aviosys]] some&lt;br /&gt;
&lt;br /&gt;
* [[Mobotix]]  all  &lt;br /&gt;
&lt;br /&gt;
*[[Edimax]] some&lt;br /&gt;
&lt;br /&gt;
* [[Conceptronic]]  some&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Compatible with problems&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
* [[Compro]] IP70. MPEG4 only, some reliability issues and general poor firmware quality.&lt;br /&gt;
&lt;br /&gt;
* [[Grandtec]] [[Grandtec_WLAN_Camera|WLAN Camera]] WiFi or III - acceptable indoor quality, no infrared-filter (better nightvision) cheap!&lt;br /&gt;
&lt;br /&gt;
* [[Intellinet]]  IPCamera with the new firmware.&lt;br /&gt;
&lt;br /&gt;
* Old Intellinet IPCamera (model MWNC-100) with this (http://www.zoneminder.com/forums/viewtopic.php?t=7500) protocol adapter. &lt;br /&gt;
&lt;br /&gt;
* OvisLink AirLive WL-5400CAM&lt;br /&gt;
&lt;br /&gt;
== Network Digitizers ==&lt;br /&gt;
&lt;br /&gt;
Like Network Cameras, these devices produce a video stream - but they accept an analog video input from a camera or other video source.&lt;br /&gt;
&lt;br /&gt;
*The [[IP9100 | Aviosys IP9100, Models A, B and Plus]] has four analog video inputs.  It produces a ZM compatible video stream from one of the inputs, which is selectable via an HTTP GET command.  There might even be a control script for ZM that lets you select the active video input using &amp;#039;&amp;#039;ZM&amp;#039;s Camera Control Presets!&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
With the yoics Aviosys 9100 firmware at http://www.yoics.com/?p=28, ZoneMinder can directly access all four ports via /usr/yoicsX.jpg as the remote host path, where X is 0 - 3.&lt;br /&gt;
&lt;br /&gt;
== USB Cameras ==&lt;br /&gt;
&lt;br /&gt;
*Just Zoom USB cam&lt;br /&gt;
&lt;br /&gt;
*Creative Webcam Pro, Webcam 3, LIVE! Cam OPTIA PRO (V4L2, Chan 0, PAL, YUYV)&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;Most&amp;#039;&amp;#039; UVCvideo cameras, including: [[Logitech QuickCam Express]], QuickCam Pro 3000, QuickCam Communicate STX/Deluxe, and [[Logitech Webcam Pro 9000]]&lt;br /&gt;
&lt;br /&gt;
*Logitech Quickcam Orbit/Sphere (experimental basic pan/tilt control has also published for testing and hacking [http://www.zoneminder.com/forums/viewtopic.php?t=9788])&lt;br /&gt;
&lt;br /&gt;
*[[Philips]] &lt;br /&gt;
&lt;br /&gt;
*Any OV511 based USB camera [http://alpha.dyndns.org/ov511/cameras.html]&lt;br /&gt;
&lt;br /&gt;
*Any CPIA based USB camera [http://webcam.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
*[[LabTec WebCam Pro]]&lt;br /&gt;
&lt;br /&gt;
*Confirmed basic functionality with Microsoft Lifecam VX 5000 using UVC Streaming method&lt;br /&gt;
&lt;br /&gt;
Note that most USB cameras that can use Video4Linux/V4L2, and so can be used by ZoneMinder.  Some have older chipsets and can be hard to find new.&lt;br /&gt;
&lt;br /&gt;
Note that PWC drivers are not included in the kernel. Some distribution&amp;#039;s add them in and other may not. Here are some relevant links:&lt;br /&gt;
* [http://www.smcc.demon.nl/webcam/ Old Maintainer]&lt;br /&gt;
* [http://www.saillard.org/linux/pwc/ Current PWC Maintainer]&lt;br /&gt;
&lt;br /&gt;
== X10 Devices ==&lt;br /&gt;
The only device that really needs to be compatable with ZM is the Transceiver, all other x10 devices comunicate through that device.&lt;br /&gt;
*[[CM11]] Bi-Directional Transceiver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other X10 notes:&lt;br /&gt;
&lt;br /&gt;
[http://www.zoneminder.com/forums/viewtopic.php?t=6423&amp;amp;highlight=x10 Topic 6423]&lt;br /&gt;
&lt;br /&gt;
[http://www.zoneminder.com/forums/viewtopic.php?t=7082&amp;amp;highlight=x10 Topic 7082]&lt;br /&gt;
&lt;br /&gt;
== All other hardware as supported by Linux ==&lt;br /&gt;
To find out if your hardware is supported, check the HCL at [http://www.linuxquestions.org/hcl/ linuxquestions.org]&lt;br /&gt;
&lt;br /&gt;
[http://kmuto.jp/debian/hcl/ Debian]&lt;br /&gt;
&lt;br /&gt;
[http://fedoraproject.org/wiki/HCL Fedora]  [http://fedora-linux.nl/wiki/index.php/HCL Fedora Unofficial HCL]&lt;br /&gt;
&lt;br /&gt;
[http://www.mandriva.com/hardware Mandriva]&lt;br /&gt;
&lt;br /&gt;
[https://hardware.redhat.com/index.cgi RedHat]&lt;br /&gt;
&lt;br /&gt;
[http://en.opensuse.org/Hardware Suse]&lt;br /&gt;
&lt;br /&gt;
[http://doc.gwos.org/index.php/HCL Ubuntu]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.macmanitou.de/mediawiki/index.php?title=Webcam_Manufacturer_Data Manufacturer Data]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plug Computers ==&lt;br /&gt;
Guruplug Server Plus -&amp;gt; How to install Zoneminder on it -&amp;gt; [http://plugcomputer.org/plugwiki/index.php/ZoneMinder PlugComputer Wiki Zoneminder Howto]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4308</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4308"/>
		<updated>2011-03-16T21:59:19Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two lines below to your systems modprobe.conf or make a bttv.conf in the modprobe.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The card is supplied with D-sub to 8 BNC connector with the connectors labelled VID1, AUD1, VID2, AUD3 etc. The /dev/video device numbering may be backwards such that /dev/video7 is VID1, /dev/video6 -&amp;gt; VID2, 5 -&amp;gt; 3, 4 -&amp;gt; 4, /dev/video3 -&amp;gt; AUD1 etc. &lt;br /&gt;
&lt;br /&gt;
See Kodicom 8800 for more information.&lt;br /&gt;
[[Kodicom 8800]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4307</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4307"/>
		<updated>2011-03-16T21:58:25Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two lines below to your systems modprobe.conf or make a bttv.conf in the modprobe.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The card is supplied with D-sub to 8 BNC connector with the connectors labelled VID1, AUD1, VID2, AUD3 etc. The /dev/video device numbering may be backwards such that /dev/video7 is VID1, /dev/video6 -&amp;gt; VID2, 5 -&amp;gt; 3, 4 -&amp;gt; 4, /dev/video3 -&amp;gt; AUD1 etc. &lt;br /&gt;
&lt;br /&gt;
See Kodicom 8800 for more information.&lt;br /&gt;
[[http://www.zoneminder.com/wiki/index.php/Kodicom_8800]Kodicom 8800]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Hardware_Compatibility_List&amp;diff=4306</id>
		<title>Hardware Compatibility List</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Hardware_Compatibility_List&amp;diff=4306"/>
		<updated>2011-03-16T21:56:28Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* bt8x8 Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zoneminder will work with almost any capture card that is supported by the linux kernel.  You may find additional details about supported hardware in the [http://www.zoneminder.com/forums/viewforum.php?f=10  Hardware Compatibility List] part of the forums.  Also if you find something in the forums that is  missing from the wiki ADD IT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Capture Cards ==&lt;br /&gt;
&lt;br /&gt;
[[Anykeeper]] &lt;br /&gt;
&lt;br /&gt;
[[Avermedia]]&lt;br /&gt;
&lt;br /&gt;
[[Camsecure PCI Express video capture]]&lt;br /&gt;
&lt;br /&gt;
[[Digiflower]]&lt;br /&gt;
&lt;br /&gt;
[[Grandtec Grand X Guard]] [http://www.grandtec.com/products/surveillance/xguard.html]&lt;br /&gt;
&lt;br /&gt;
[[Hauppauge]]&lt;br /&gt;
&lt;br /&gt;
[[Ituner Spectra 8]] [http://www.ituner.com/spectra.htm]&lt;br /&gt;
&lt;br /&gt;
[[Kodicom 4400r]]&lt;br /&gt;
&lt;br /&gt;
[[Kodicom 8800]]&lt;br /&gt;
&lt;br /&gt;
[[Tungson TE-8008]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Leadtek WinFast VC 100 - the cheapest bt878 model with no tuner on it, just Com/Svideo in.&lt;br /&gt;
&lt;br /&gt;
[[Linux Media Labs LMLBT44]] [http://www.linuxmedialabs.com]&lt;br /&gt;
&lt;br /&gt;
[[Osprey 100]]&lt;br /&gt;
&lt;br /&gt;
[[Provideo PV- series (Bluecherry)]] [http://store.bluecherry.net/SearchResults.asp?Cat=63&amp;amp;Click=51]&lt;br /&gt;
&lt;br /&gt;
[[TView 95/99]]&lt;br /&gt;
&lt;br /&gt;
[[Videocards with Philips saa7134 chipset]]&lt;br /&gt;
&lt;br /&gt;
[[WinFast TV2000 XP]]&lt;br /&gt;
&lt;br /&gt;
[[Rapid OS]]&lt;br /&gt;
&lt;br /&gt;
== bt8x8 Cards ==&lt;br /&gt;
A note on the bt8x8-based TV-tuner cards: these usually have beside the tuner input, also a Composite and an S-Video input. You can hook up 2 analog cameras to these, and access from ZoneMinder both of them as individual cameras, at max 15Fps. You don&amp;#039;t need two separate TV cards for two cameras!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Pico2000]] - 4 port card, one chip bt878, around 2 fps when using all channels&lt;br /&gt;
&lt;br /&gt;
[[Bt878_4chip_8inputs]] -4 chips bt878, 8 inputs, around 5 fps when using 2 inputs per chip&lt;br /&gt;
&lt;br /&gt;
[[:Image:Karta.jpg| bt878 8 chip 8 input]] - This card is supplied with D-sub to 8 BNC connector. See [[Kodicom 8800]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most other BTTV (bt878, bt848) cards, see /usr/src/linux/Documentation/video4linux/bttv/CARDLIST on your system for a list of some of them.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Analog Cameras ==&lt;br /&gt;
&lt;br /&gt;
Any regular composite or S-video camera connected via a supported capture card.  Some analog cameras feature camera control - ZM supports several of these camera&amp;#039;s Pan/Tilt/Zoom functions via serial port control, as well as camera Presets, Focus, Iris, etc.&lt;br /&gt;
*[[PicturetelControlScript | PictureTel PTZ2N]].&lt;br /&gt;
&lt;br /&gt;
== Network Cameras ==&lt;br /&gt;
For Network Cams to work they need to be able to stream MJPEG without the requirement of activex controls. If you see the requirement for the camera calls for IE then there is a good chance it may not work. The other option is to grab JPEG images if the camera supports that option which will work but at a lower frame rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any network camera that allows access to single JPEG image grabs or &amp;#039;&amp;#039;&amp;#039;some but not all&amp;#039;&amp;#039;&amp;#039; multi-part JPEG feeds.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Full Compatibility &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [[Abus]]  some&lt;br /&gt;
&lt;br /&gt;
* [[Airlink 101]] some &lt;br /&gt;
&lt;br /&gt;
* [[Axis]] All&lt;br /&gt;
&lt;br /&gt;
* [[Astak Mole]] Some&lt;br /&gt;
&lt;br /&gt;
* [[BSTI]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Cisco]] some&lt;br /&gt;
&lt;br /&gt;
* [[D-Link]] Most&lt;br /&gt;
&lt;br /&gt;
* [[Foscam]] (FI8908W, FI8904W, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Gadspot]] Most&lt;br /&gt;
&lt;br /&gt;
* [[hootoo]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Instar]] (IN-2905, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Level One]] some&lt;br /&gt;
&lt;br /&gt;
* [[Linksys]] WVC-210 / WVC2300 / PVC2300 / WVC54GC&lt;br /&gt;
&lt;br /&gt;
* [[Maygion]] (IP-603, IP-604, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Rimax]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Sony]] Most&lt;br /&gt;
&lt;br /&gt;
* TP-LINK [[TLSC-3000]]&lt;br /&gt;
&lt;br /&gt;
* [[Trendnet]] Most&lt;br /&gt;
&lt;br /&gt;
* [[Y-Cam]] (Sharx Ip) Most&lt;br /&gt;
&lt;br /&gt;
* [[Zavio]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Iguard]] IP390E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Remote systems, themselves running zoneminder, can be accessed as cameras using the Remote Path of &amp;#039;&amp;#039;&amp;#039;/cgi-bin/nph-zms?mode=single&amp;amp;monitor=1&amp;amp;scale=100&amp;amp;maxfps=5&amp;amp;buffer=1000&amp;#039;&amp;#039;&amp;#039; - where the monitor number is the correct camera on the remote system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Single Jpeg Only&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [[Airlink 101]] some&lt;br /&gt;
&lt;br /&gt;
* [[JVC]] some&lt;br /&gt;
&lt;br /&gt;
* [[Panasonic]] some&lt;br /&gt;
&lt;br /&gt;
* PLANET some&lt;br /&gt;
&lt;br /&gt;
*[[Toshiba]] some&lt;br /&gt;
&lt;br /&gt;
* [[Veo Observer IP NetCam]] most&lt;br /&gt;
&lt;br /&gt;
*[[Vivotek]] All&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Mpeg(ver1.24.0 and up)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*[[ABS_MegaCam]]&lt;br /&gt;
&lt;br /&gt;
* [[Axis]] All&lt;br /&gt;
&lt;br /&gt;
* [[ ACTi]] All&lt;br /&gt;
&lt;br /&gt;
*[[Vivotek]] Most&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Compatible with modifications&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*[[Aviosys]] some&lt;br /&gt;
&lt;br /&gt;
* [[Mobotix]]  all  &lt;br /&gt;
&lt;br /&gt;
*[[Edimax]] some&lt;br /&gt;
&lt;br /&gt;
* [[Conceptronic]]  some&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Compatible with problems&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
* [[Compro]] IP70. MPEG4 only, some reliability issues and general poor firmware quality.&lt;br /&gt;
&lt;br /&gt;
* [[Grandtec]] [[Grandtec_WLAN_Camera|WLAN Camera]] WiFi or III - acceptable indoor quality, no infrared-filter (better nightvision) cheap!&lt;br /&gt;
&lt;br /&gt;
* [[Intellinet]]  IPCamera with the new firmware.&lt;br /&gt;
&lt;br /&gt;
* Old Intellinet IPCamera (model MWNC-100) with this (http://www.zoneminder.com/forums/viewtopic.php?t=7500) protocol adapter. &lt;br /&gt;
&lt;br /&gt;
* OvisLink AirLive WL-5400CAM&lt;br /&gt;
&lt;br /&gt;
== Network Digitizers ==&lt;br /&gt;
&lt;br /&gt;
Like Network Cameras, these devices produce a video stream - but they accept an analog video input from a camera or other video source.&lt;br /&gt;
&lt;br /&gt;
*The [[IP9100 | Aviosys IP9100, Models A, B and Plus]] has four analog video inputs.  It produces a ZM compatible video stream from one of the inputs, which is selectable via an HTTP GET command.  There might even be a control script for ZM that lets you select the active video input using &amp;#039;&amp;#039;ZM&amp;#039;s Camera Control Presets!&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
With the yoics Aviosys 9100 firmware at http://www.yoics.com/?p=28, ZoneMinder can directly access all four ports via /usr/yoicsX.jpg as the remote host path, where X is 0 - 3.&lt;br /&gt;
&lt;br /&gt;
== USB Cameras ==&lt;br /&gt;
&lt;br /&gt;
*Just Zoom USB cam&lt;br /&gt;
&lt;br /&gt;
*Creative Webcam Pro, Webcam 3, LIVE! Cam OPTIA PRO (V4L2, Chan 0, PAL, YUYV)&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;Most&amp;#039;&amp;#039; UVCvideo cameras, including: [[Logitech QuickCam Express]], QuickCam Pro 3000, QuickCam Communicate STX/Deluxe, and [[Logitech Webcam Pro 9000]]&lt;br /&gt;
&lt;br /&gt;
*Logitech Quickcam Orbit/Sphere (experimental basic pan/tilt control has also published for testing and hacking [http://www.zoneminder.com/forums/viewtopic.php?t=9788])&lt;br /&gt;
&lt;br /&gt;
*[[Philips]] &lt;br /&gt;
&lt;br /&gt;
*Any OV511 based USB camera [http://alpha.dyndns.org/ov511/cameras.html]&lt;br /&gt;
&lt;br /&gt;
*Any CPIA based USB camera [http://webcam.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
*[[LabTec WebCam Pro]]&lt;br /&gt;
&lt;br /&gt;
*Confirmed basic functionality with Microsoft Lifecam VX 5000 using UVC Streaming method&lt;br /&gt;
&lt;br /&gt;
Note that most USB cameras that can use Video4Linux/V4L2, and so can be used by ZoneMinder.  Some have older chipsets and can be hard to find new.&lt;br /&gt;
&lt;br /&gt;
Note that PWC drivers are not included in the kernel. Some distribution&amp;#039;s add them in and other may not. Here are some relevant links:&lt;br /&gt;
* [http://www.smcc.demon.nl/webcam/ Old Maintainer]&lt;br /&gt;
* [http://www.saillard.org/linux/pwc/ Current PWC Maintainer]&lt;br /&gt;
&lt;br /&gt;
== X10 Devices ==&lt;br /&gt;
The only device that really needs to be compatable with ZM is the Transceiver, all other x10 devices comunicate through that device.&lt;br /&gt;
*[[CM11]] Bi-Directional Transceiver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other X10 notes:&lt;br /&gt;
&lt;br /&gt;
[http://www.zoneminder.com/forums/viewtopic.php?t=6423&amp;amp;highlight=x10 Topic 6423]&lt;br /&gt;
&lt;br /&gt;
[http://www.zoneminder.com/forums/viewtopic.php?t=7082&amp;amp;highlight=x10 Topic 7082]&lt;br /&gt;
&lt;br /&gt;
== All other hardware as supported by Linux ==&lt;br /&gt;
To find out if your hardware is supported, check the HCL at [http://www.linuxquestions.org/hcl/ linuxquestions.org]&lt;br /&gt;
&lt;br /&gt;
[http://kmuto.jp/debian/hcl/ Debian]&lt;br /&gt;
&lt;br /&gt;
[http://fedoraproject.org/wiki/HCL Fedora]  [http://fedora-linux.nl/wiki/index.php/HCL Fedora Unofficial HCL]&lt;br /&gt;
&lt;br /&gt;
[http://www.mandriva.com/hardware Mandriva]&lt;br /&gt;
&lt;br /&gt;
[https://hardware.redhat.com/index.cgi RedHat]&lt;br /&gt;
&lt;br /&gt;
[http://en.opensuse.org/Hardware Suse]&lt;br /&gt;
&lt;br /&gt;
[http://doc.gwos.org/index.php/HCL Ubuntu]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.macmanitou.de/mediawiki/index.php?title=Webcam_Manufacturer_Data Manufacturer Data]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plug Computers ==&lt;br /&gt;
Guruplug Server Plus -&amp;gt; How to install Zoneminder on it -&amp;gt; [http://plugcomputer.org/plugwiki/index.php/ZoneMinder PlugComputer Wiki Zoneminder Howto]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Hardware_Compatibility_List&amp;diff=4305</id>
		<title>Hardware Compatibility List</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Hardware_Compatibility_List&amp;diff=4305"/>
		<updated>2011-03-16T21:47:24Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* bt8x8 Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zoneminder will work with almost any capture card that is supported by the linux kernel.  You may find additional details about supported hardware in the [http://www.zoneminder.com/forums/viewforum.php?f=10  Hardware Compatibility List] part of the forums.  Also if you find something in the forums that is  missing from the wiki ADD IT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Capture Cards ==&lt;br /&gt;
&lt;br /&gt;
[[Anykeeper]] &lt;br /&gt;
&lt;br /&gt;
[[Avermedia]]&lt;br /&gt;
&lt;br /&gt;
[[Camsecure PCI Express video capture]]&lt;br /&gt;
&lt;br /&gt;
[[Digiflower]]&lt;br /&gt;
&lt;br /&gt;
[[Grandtec Grand X Guard]] [http://www.grandtec.com/products/surveillance/xguard.html]&lt;br /&gt;
&lt;br /&gt;
[[Hauppauge]]&lt;br /&gt;
&lt;br /&gt;
[[Ituner Spectra 8]] [http://www.ituner.com/spectra.htm]&lt;br /&gt;
&lt;br /&gt;
[[Kodicom 4400r]]&lt;br /&gt;
&lt;br /&gt;
[[Kodicom 8800]]&lt;br /&gt;
&lt;br /&gt;
[[Tungson TE-8008]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Leadtek WinFast VC 100 - the cheapest bt878 model with no tuner on it, just Com/Svideo in.&lt;br /&gt;
&lt;br /&gt;
[[Linux Media Labs LMLBT44]] [http://www.linuxmedialabs.com]&lt;br /&gt;
&lt;br /&gt;
[[Osprey 100]]&lt;br /&gt;
&lt;br /&gt;
[[Provideo PV- series (Bluecherry)]] [http://store.bluecherry.net/SearchResults.asp?Cat=63&amp;amp;Click=51]&lt;br /&gt;
&lt;br /&gt;
[[TView 95/99]]&lt;br /&gt;
&lt;br /&gt;
[[Videocards with Philips saa7134 chipset]]&lt;br /&gt;
&lt;br /&gt;
[[WinFast TV2000 XP]]&lt;br /&gt;
&lt;br /&gt;
[[Rapid OS]]&lt;br /&gt;
&lt;br /&gt;
== bt8x8 Cards ==&lt;br /&gt;
A note on the bt8x8-based TV-tuner cards: these usually have beside the tuner input, also a Composite and an S-Video input. You can hook up 2 analog cameras to these, and access from ZoneMinder both of them as individual cameras, at max 15Fps. You don&amp;#039;t need two separate TV cards for two cameras!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Pico2000]] - 4 port card, one chip bt878, around 2 fps when using all channels&lt;br /&gt;
&lt;br /&gt;
[[Bt878_4chip_8inputs]] -4 chips bt878, 8 inputs, around 5 fps when using 2 inputs per chip&lt;br /&gt;
&lt;br /&gt;
[[:Image:Karta.jpg| bt878 8 chip 8 input]] - This card is supplied with D-sub to 8 BNC connector with the connectors labelled VID1, AUD1, VID2, AUD3 etc. The /dev/video device numbering may be backwards such that /dev/video7 is VID1, /dev/video6 -&amp;gt; VID2, 5 -&amp;gt; 3, 4 -&amp;gt; 4, /dev/video3 -&amp;gt; AUD1 etc. See [[Kodicom 8800]] for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most other BTTV (bt878, bt848) cards, see /usr/src/linux/Documentation/video4linux/bttv/CARDLIST on your system for a list of some of them.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Analog Cameras ==&lt;br /&gt;
&lt;br /&gt;
Any regular composite or S-video camera connected via a supported capture card.  Some analog cameras feature camera control - ZM supports several of these camera&amp;#039;s Pan/Tilt/Zoom functions via serial port control, as well as camera Presets, Focus, Iris, etc.&lt;br /&gt;
*[[PicturetelControlScript | PictureTel PTZ2N]].&lt;br /&gt;
&lt;br /&gt;
== Network Cameras ==&lt;br /&gt;
For Network Cams to work they need to be able to stream MJPEG without the requirement of activex controls. If you see the requirement for the camera calls for IE then there is a good chance it may not work. The other option is to grab JPEG images if the camera supports that option which will work but at a lower frame rate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any network camera that allows access to single JPEG image grabs or &amp;#039;&amp;#039;&amp;#039;some but not all&amp;#039;&amp;#039;&amp;#039; multi-part JPEG feeds.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Full Compatibility &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [[Abus]]  some&lt;br /&gt;
&lt;br /&gt;
* [[Airlink 101]] some &lt;br /&gt;
&lt;br /&gt;
* [[Axis]] All&lt;br /&gt;
&lt;br /&gt;
* [[Astak Mole]] Some&lt;br /&gt;
&lt;br /&gt;
* [[BSTI]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Cisco]] some&lt;br /&gt;
&lt;br /&gt;
* [[D-Link]] Most&lt;br /&gt;
&lt;br /&gt;
* [[Foscam]] (FI8908W, FI8904W, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Gadspot]] Most&lt;br /&gt;
&lt;br /&gt;
* [[hootoo]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Instar]] (IN-2905, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Level One]] some&lt;br /&gt;
&lt;br /&gt;
* [[Linksys]] WVC-210 / WVC2300 / PVC2300 / WVC54GC&lt;br /&gt;
&lt;br /&gt;
* [[Maygion]] (IP-603, IP-604, possibly others)&lt;br /&gt;
&lt;br /&gt;
* [[Rimax]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Sony]] Most&lt;br /&gt;
&lt;br /&gt;
* TP-LINK [[TLSC-3000]]&lt;br /&gt;
&lt;br /&gt;
* [[Trendnet]] Most&lt;br /&gt;
&lt;br /&gt;
* [[Y-Cam]] (Sharx Ip) Most&lt;br /&gt;
&lt;br /&gt;
* [[Zavio]] Some&lt;br /&gt;
&lt;br /&gt;
* [[Iguard]] IP390E&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Remote systems, themselves running zoneminder, can be accessed as cameras using the Remote Path of &amp;#039;&amp;#039;&amp;#039;/cgi-bin/nph-zms?mode=single&amp;amp;monitor=1&amp;amp;scale=100&amp;amp;maxfps=5&amp;amp;buffer=1000&amp;#039;&amp;#039;&amp;#039; - where the monitor number is the correct camera on the remote system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Single Jpeg Only&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* [[Airlink 101]] some&lt;br /&gt;
&lt;br /&gt;
* [[JVC]] some&lt;br /&gt;
&lt;br /&gt;
* [[Panasonic]] some&lt;br /&gt;
&lt;br /&gt;
* PLANET some&lt;br /&gt;
&lt;br /&gt;
*[[Toshiba]] some&lt;br /&gt;
&lt;br /&gt;
* [[Veo Observer IP NetCam]] most&lt;br /&gt;
&lt;br /&gt;
*[[Vivotek]] All&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Mpeg(ver1.24.0 and up)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*[[ABS_MegaCam]]&lt;br /&gt;
&lt;br /&gt;
* [[Axis]] All&lt;br /&gt;
&lt;br /&gt;
* [[ ACTi]] All&lt;br /&gt;
&lt;br /&gt;
*[[Vivotek]] Most&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Compatible with modifications&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*[[Aviosys]] some&lt;br /&gt;
&lt;br /&gt;
* [[Mobotix]]  all  &lt;br /&gt;
&lt;br /&gt;
*[[Edimax]] some&lt;br /&gt;
&lt;br /&gt;
* [[Conceptronic]]  some&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Compatible with problems&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
* [[Compro]] IP70. MPEG4 only, some reliability issues and general poor firmware quality.&lt;br /&gt;
&lt;br /&gt;
* [[Grandtec]] [[Grandtec_WLAN_Camera|WLAN Camera]] WiFi or III - acceptable indoor quality, no infrared-filter (better nightvision) cheap!&lt;br /&gt;
&lt;br /&gt;
* [[Intellinet]]  IPCamera with the new firmware.&lt;br /&gt;
&lt;br /&gt;
* Old Intellinet IPCamera (model MWNC-100) with this (http://www.zoneminder.com/forums/viewtopic.php?t=7500) protocol adapter. &lt;br /&gt;
&lt;br /&gt;
* OvisLink AirLive WL-5400CAM&lt;br /&gt;
&lt;br /&gt;
== Network Digitizers ==&lt;br /&gt;
&lt;br /&gt;
Like Network Cameras, these devices produce a video stream - but they accept an analog video input from a camera or other video source.&lt;br /&gt;
&lt;br /&gt;
*The [[IP9100 | Aviosys IP9100, Models A, B and Plus]] has four analog video inputs.  It produces a ZM compatible video stream from one of the inputs, which is selectable via an HTTP GET command.  There might even be a control script for ZM that lets you select the active video input using &amp;#039;&amp;#039;ZM&amp;#039;s Camera Control Presets!&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
With the yoics Aviosys 9100 firmware at http://www.yoics.com/?p=28, ZoneMinder can directly access all four ports via /usr/yoicsX.jpg as the remote host path, where X is 0 - 3.&lt;br /&gt;
&lt;br /&gt;
== USB Cameras ==&lt;br /&gt;
&lt;br /&gt;
*Just Zoom USB cam&lt;br /&gt;
&lt;br /&gt;
*Creative Webcam Pro, Webcam 3, LIVE! Cam OPTIA PRO (V4L2, Chan 0, PAL, YUYV)&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;Most&amp;#039;&amp;#039; UVCvideo cameras, including: [[Logitech QuickCam Express]], QuickCam Pro 3000, QuickCam Communicate STX/Deluxe, and [[Logitech Webcam Pro 9000]]&lt;br /&gt;
&lt;br /&gt;
*Logitech Quickcam Orbit/Sphere (experimental basic pan/tilt control has also published for testing and hacking [http://www.zoneminder.com/forums/viewtopic.php?t=9788])&lt;br /&gt;
&lt;br /&gt;
*[[Philips]] &lt;br /&gt;
&lt;br /&gt;
*Any OV511 based USB camera [http://alpha.dyndns.org/ov511/cameras.html]&lt;br /&gt;
&lt;br /&gt;
*Any CPIA based USB camera [http://webcam.sourceforge.net]&lt;br /&gt;
&lt;br /&gt;
*[[LabTec WebCam Pro]]&lt;br /&gt;
&lt;br /&gt;
*Confirmed basic functionality with Microsoft Lifecam VX 5000 using UVC Streaming method&lt;br /&gt;
&lt;br /&gt;
Note that most USB cameras that can use Video4Linux/V4L2, and so can be used by ZoneMinder.  Some have older chipsets and can be hard to find new.&lt;br /&gt;
&lt;br /&gt;
Note that PWC drivers are not included in the kernel. Some distribution&amp;#039;s add them in and other may not. Here are some relevant links:&lt;br /&gt;
* [http://www.smcc.demon.nl/webcam/ Old Maintainer]&lt;br /&gt;
* [http://www.saillard.org/linux/pwc/ Current PWC Maintainer]&lt;br /&gt;
&lt;br /&gt;
== X10 Devices ==&lt;br /&gt;
The only device that really needs to be compatable with ZM is the Transceiver, all other x10 devices comunicate through that device.&lt;br /&gt;
*[[CM11]] Bi-Directional Transceiver&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other X10 notes:&lt;br /&gt;
&lt;br /&gt;
[http://www.zoneminder.com/forums/viewtopic.php?t=6423&amp;amp;highlight=x10 Topic 6423]&lt;br /&gt;
&lt;br /&gt;
[http://www.zoneminder.com/forums/viewtopic.php?t=7082&amp;amp;highlight=x10 Topic 7082]&lt;br /&gt;
&lt;br /&gt;
== All other hardware as supported by Linux ==&lt;br /&gt;
To find out if your hardware is supported, check the HCL at [http://www.linuxquestions.org/hcl/ linuxquestions.org]&lt;br /&gt;
&lt;br /&gt;
[http://kmuto.jp/debian/hcl/ Debian]&lt;br /&gt;
&lt;br /&gt;
[http://fedoraproject.org/wiki/HCL Fedora]  [http://fedora-linux.nl/wiki/index.php/HCL Fedora Unofficial HCL]&lt;br /&gt;
&lt;br /&gt;
[http://www.mandriva.com/hardware Mandriva]&lt;br /&gt;
&lt;br /&gt;
[https://hardware.redhat.com/index.cgi RedHat]&lt;br /&gt;
&lt;br /&gt;
[http://en.opensuse.org/Hardware Suse]&lt;br /&gt;
&lt;br /&gt;
[http://doc.gwos.org/index.php/HCL Ubuntu]&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [http://www.macmanitou.de/mediawiki/index.php?title=Webcam_Manufacturer_Data Manufacturer Data]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Plug Computers ==&lt;br /&gt;
Guruplug Server Plus -&amp;gt; How to install Zoneminder on it -&amp;gt; [http://plugcomputer.org/plugwiki/index.php/ZoneMinder PlugComputer Wiki Zoneminder Howto]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4304</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4304"/>
		<updated>2011-03-16T21:46:04Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two lines below to your systems modprobe.conf or make a bttv.conf in the modprobe.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The card is supplied with D-sub to 8 BNC connector with the connectors labelled VID1, AUD1, VID2, AUD3 etc. The /dev/video device numbering may be backwards such that /dev/video7 is VID1, /dev/video6 -&amp;gt; VID2, 5 -&amp;gt; 3, 4 -&amp;gt; 4, /dev/video3 -&amp;gt; AUD1 etc. &lt;br /&gt;
&lt;br /&gt;
See Kodicom 8800 for more information.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://www.zoneminder.com/wiki/index.php/Kodicom_8800&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4303</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4303"/>
		<updated>2011-03-16T21:44:48Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two lines below to your systems modprobe.conf or make a bttv.conf in the modprobe.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
options bttv card=77,77,77,77,77,77,77,77. The card is supplied with D-sub to 8 BNC connector with the connectors labelled VID1, AUD1, VID2, AUD3 etc. The /dev/video device numbering may be backwards such that /dev/video7 is VID1, /dev/video6 -&amp;gt; VID2, 5 -&amp;gt; 3, 4 -&amp;gt; 4, /dev/video3 -&amp;gt; AUD1 etc. &lt;br /&gt;
&lt;br /&gt;
See Kodicom 8800 for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=Bt878_4chip_8inputs&amp;diff=4302</id>
		<title>Bt878 4chip 8inputs</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=Bt878_4chip_8inputs&amp;diff=4302"/>
		<updated>2011-03-16T21:43:09Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Noname with 4 bt878 chips and 8 inputs ==&lt;br /&gt;
&lt;br /&gt;
* tip: also check [[Pico2000]] related card info;&lt;br /&gt;
&lt;br /&gt;
When using all channels you&amp;#039;ll get around 5 fps.&lt;br /&gt;
Warning it takes a long time to boot using this card. Maybe settings are bad. But it is working OK.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=0,0,0,0 tuner=4,4,4,4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If your driver is compiled into the kernel, add the following to be passed onto the kernel from LILO or GRUB.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bttv.card=0,0,0,0 bttv.tuner=4,4,4,4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Photos ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Bt878_4chip_8inputs_1.jpg|200px]]&lt;br /&gt;
[[Image:Bt878_4chip_8inputs_2.jpg|200px]]&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4301</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4301"/>
		<updated>2011-03-16T21:42:10Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two lines below to your systems modprobe.conf or make a bttv.conf in the modprobe.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4300</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4300"/>
		<updated>2011-03-16T21:41:29Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two line below to your systems modprobe.conf or make a bttv.conf in the modprobe.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4299</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4299"/>
		<updated>2011-03-16T21:38:27Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Add the two line below to your systems modprobe.conf or make a bttv.conf in the modprob.d directory depending on your distro.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above configuration is for the Camsecure 8 chip card, if you are having difficulty then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4298</id>
		<title>File:Karta.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=File:Karta.jpg&amp;diff=4298"/>
		<updated>2011-03-16T21:36:47Z</updated>

		<summary type="html">&lt;p&gt;Clipo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Configuration ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;/etc/modprobe.conf&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options i2c-algo-bit bit_test=1&lt;br /&gt;
options bttv gbuffers=16 card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This configuration is for the Camsecure 8 chip card, if you are having any difficulty with then try the more basic version below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options bttv card=102,102,102,102,102,102,102,102 radio=0,0,0,0,0,0,0,0 tuner=4,4,4,4,4,4,4,4 autoload=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* A list of card types and tuner types can be found in the Linux kernel sources under Documentation&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://linuxtv.org/hg/v4l-dvb/file/tip/linux/Documentation/video4linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4297</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4297"/>
		<updated>2011-03-16T21:24:56Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* Why is the timeline view all messed up? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
This function has from time to time been corrupted in the SVN release or in the stable releases, try and reinstall from a fresh download.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This error some times happens when a linked camera looses its link or it is corrupted by the user or some other system event, try deleting the affected cameras and recreating them in the Zoneminder console.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4296</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4296"/>
		<updated>2011-03-16T21:20:28Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* I am getting messages about a backtrace in my logs, what do I do? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This error some times happens when a linked camera looses its link or it is corrupted by the user or some other system event, try deleting the affected cameras and recreating them in the Zoneminder console.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4295</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4295"/>
		<updated>2011-03-16T21:01:05Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4294</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4294"/>
		<updated>2011-03-16T20:56:30Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4293</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4293"/>
		<updated>2011-03-16T20:53:54Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ ./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4292</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4292"/>
		<updated>2011-03-16T20:41:43Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ ./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 3/4 before the processor optimisation.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; --enable-mmap --sysconfdir=/etc/zm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4291</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4291"/>
		<updated>2011-03-16T20:39:23Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ ./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3.&lt;br /&gt;
You also need to put in your normal ./configure commands as if you were compiling with out this optimisation.&lt;br /&gt;
A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code.&lt;br /&gt;
&lt;br /&gt;
Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 3/4 before the process or tweak.&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4290</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=FAQ&amp;diff=4290"/>
		<updated>2011-03-16T20:21:13Z</updated>

		<summary type="html">&lt;p&gt;Clipo: /* My load is too high, how can I reduce it? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ZoneMinder Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
This is the new FAQ page. I will be migrating the existing FAQs here as soon as possible. In the meantime the old FAQ page is available [http://www.zoneminder.com/faq.html here].&lt;br /&gt;
&lt;br /&gt;
Feel free to contribute any FAQs that you think are missing.&lt;br /&gt;
&lt;br /&gt;
===How can I stop ZoneMinder filling up my disk?===&lt;br /&gt;
&lt;br /&gt;
Recent versions of ZoneMinder come with a filter you can use for this purpose already included. However &amp;#039;&amp;#039;&amp;#039;by default it is not enabled for event deletion&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The filter is called &amp;#039;&amp;#039;PurgeWhenFull&amp;#039;&amp;#039; and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors.&lt;br /&gt;
&lt;br /&gt;
This will bring up an event listing and a filter window.&lt;br /&gt;
&lt;br /&gt;
In the filter window there is a drop down select box labeled &amp;#039;Use Filter&amp;#039;, that lets your select a saved filter. Select &amp;#039;PurgeWhenFull&amp;#039; and it will load that filter.&lt;br /&gt;
&lt;br /&gt;
Make any modifications you might want, such as the percentage full you want it to kick in, or how many events to delete at a time (it will repeat the filter as many times as needed to clear the space, but will only delete this many events each time to get there).&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;#039;Save&amp;#039; which will bring up a new window. Make sure the &amp;#039;Automatically delete&amp;#039; box is checked and press save to save your filter. This will then run in the background to keep your disk within those limits.&lt;br /&gt;
&lt;br /&gt;
After you&amp;#039;ve done that, you changes will automatically be loaded into zmfilter within a few minutes.&lt;br /&gt;
&lt;br /&gt;
Check the &amp;lt;tt&amp;gt;zmfilter.log&amp;lt;/tt&amp;gt; file to make sure it is running as sometimes missing perl modules mean that it never runs but people don&amp;#039;t always realize.&lt;br /&gt;
&lt;br /&gt;
There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_OPT_FAST_DELETE:&lt;br /&gt;
&lt;br /&gt;
Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_RUN_AUDIT:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ZM_AUDIT_CHECK_INTERVAL:&lt;br /&gt;
&lt;br /&gt;
The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using &amp;#039;fast deletes&amp;#039; it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed.&lt;br /&gt;
&lt;br /&gt;
===What does a &amp;#039;Can&amp;#039;t shmget: Invalid argument&amp;#039; error in my logs mean? and my cameras won&amp;#039;t display video at higher resolutions.===&lt;br /&gt;
&lt;br /&gt;
This error is discussed in the README in the following excerpt:-&lt;br /&gt;
&amp;#039;&amp;#039;...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead.&lt;br /&gt;
&lt;br /&gt;
So, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;384x288 capture resolution, that makes: 110 592 pixels&lt;br /&gt;
in 24 bit color that&amp;#039;s x24 = 2 654 208 bits per frame &lt;br /&gt;
by 80 frames ring buffer x80 = 212 336 640 bits per camera &lt;br /&gt;
by 4 cameras x4 = 849 346 560 bits. &lt;br /&gt;
Plus 10% overhead = 934 281 216 bits &lt;br /&gt;
That&amp;#039;s 116 785 152 bytes, and &lt;br /&gt;
= 114 048 kB, respectively 111.38 MB. &lt;br /&gt;
If my shared memory is set to 134 217 728, which is exactly 128MB, &lt;br /&gt;
that means I shouldn&amp;#039;t have any problem.&lt;br /&gt;
(Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings at http://www.redhat.com/docs/manuals/database/RHDB-2.1-Manual/admin_user/kernel-resources.html .  &lt;br /&gt;
&lt;br /&gt;
You should be able to use a similar procedure  with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can often find out how much shared memory is available by typing the following :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmall&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the most you can allocate in one go :-&lt;br /&gt;
&amp;lt;pre&amp;gt;cat /proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change these values type (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;echo 134217728 &amp;gt;/proc/sys/kernel/shmall&lt;br /&gt;
echo 134217728 &amp;gt;/proc/sys/kernel/shmmax&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Be sure to restart ZoneMinder after this.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. &lt;br /&gt;
&lt;br /&gt;
To change them permanently you will need to edit &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; and add the following lines (for example) :-&lt;br /&gt;
&amp;lt;pre&amp;gt;kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To load these settings in the sysctl.conf file type:&lt;br /&gt;
&amp;lt;pre&amp;gt;sysctl -p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check your shared memory settings type:&lt;br /&gt;
&amp;lt;pre&amp;gt;ipcs -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full colour, increase 134217728 to, for example, 268424446&lt;br /&gt;
&lt;br /&gt;
These changes will now also be set the next time your machine is restarted.&lt;br /&gt;
&lt;br /&gt;
Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, [http://en.wikipedia.org/wiki/Mmap mapped memory]. This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is &amp;#039;mapped&amp;#039; into memory space for easy and fast access.&lt;br /&gt;
&lt;br /&gt;
To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options-&amp;gt;paths-&amp;gt;PATH_MAP. It uses a filesystem type called [http://en.wikipedia.org/wiki/Tmpfs tmpfs]. If you type &amp;#039;df&amp;#039; you should see this area and the size of memory it currently allows. It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap.&amp;lt;monitor id&amp;gt; in the mapped memory filesystem.&lt;br /&gt;
&lt;br /&gt;
Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;AlternateSharedMemory&amp;quot; style=&amp;quot;width:80%; border:2px solid #8a8588; background:#faf5ff; vertical-align:top; margin-top: 6px; padding: 4px;&amp;quot;&amp;gt;&lt;br /&gt;
Another good article about shared memory settings http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm . &lt;br /&gt;
It made a statement that conflicted with those in the Redhat article but they fixed a [http://www.zoneminder.com/forums/viewtopic.php?t=9692 long standing memory issue on FC6], so give them a try. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For example:&amp;#039;&amp;#039;&amp;#039; If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments).&lt;br /&gt;
with a page size of 4096.&lt;br /&gt;
*kernel.shmall=8000x1024x1024/4096&lt;br /&gt;
**kernel.shmall=2048000&lt;br /&gt;
NOT 8388608000 as would be suggested in the RedHat article linked above.&lt;br /&gt;
&lt;br /&gt;
shmmax is the max amount to allocate in one request - &lt;br /&gt;
this is is an actual memory size (as opposed to pages) set to 4GB&lt;br /&gt;
*kernel.shmmax = 4194304000&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; would have these lines&amp;lt;pre&amp;gt;kernel.shmall=2048000&lt;br /&gt;
kernel.shmmax = 4194304000&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As above, reload your sysctl.conf with &amp;lt;tt&amp;gt;sysctl -p&amp;lt;/tt&amp;gt; and check that the settings are correct with &amp;lt;tt&amp;gt;ipcs -l&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===I have enabled motion detection but it is not always being triggered when things happen in the camera view===&lt;br /&gt;
&lt;br /&gt;
ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (http://www.zoneminder.com/wiki/index.php/Documentation#Defining_Zones) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use.&lt;br /&gt;
&lt;br /&gt;
====Event Statistics====&lt;br /&gt;
The first technique is to use event statistics. Firstly you should ensure they are switched on in Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the &amp;#039;Stats&amp;#039; link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what &amp;#039;real world&amp;#039; values are being generated. &lt;br /&gt;
&lt;br /&gt;
Note that if you are investigating why events &amp;#039;do not&amp;#039; happen then these will not be saved and so won&amp;#039;t be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don&amp;#039;t want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn&amp;#039;t.&lt;br /&gt;
&lt;br /&gt;
Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically.&lt;br /&gt;
&lt;br /&gt;
====Diagnostic Images====&lt;br /&gt;
The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options-&amp;gt;Debug-&amp;gt;ZM_RECORD_DIAG_IMAGES.&lt;br /&gt;
&lt;br /&gt;
There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix.&lt;br /&gt;
&lt;br /&gt;
The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identicial pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think).&lt;br /&gt;
&lt;br /&gt;
The second set of diag images are labelled as diag-&amp;lt;zoneid&amp;gt;-&amp;lt;stage&amp;gt;.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows,&lt;br /&gt;
&lt;br /&gt;
# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black.&lt;br /&gt;
# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event.&lt;br /&gt;
# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what.&lt;br /&gt;
# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image.&lt;br /&gt;
&lt;br /&gt;
Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar?===&lt;br /&gt;
&lt;br /&gt;
With capture cards ZoneMinder will pull images as fast as it possibly can unless limited by configuration. ZoneMinder (and any similar application) uses the frame grabber interface to copy frames from video memory into user memory. This takes some time, plus if you have several inputs sharing one capture chip it has to switch between inputs between captures which further slows things down.&lt;br /&gt;
&lt;br /&gt;
On average a card that can capture at 25fps per chip PAL for one input will do maybe 6-10fps for two, 1-4fps for three and 1-2 for four. For a 30fps NTSC chip the figures will be correspondingly higher. However sometimes it is necessary to slow down capture even further as after an input switch it may take a short while for the new image to settle before it can be captured without corruption.&lt;br /&gt;
&lt;br /&gt;
When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card&amp;#039;s video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Why can&amp;#039;t I see streamed images when I can see stills in the Zone window etc?===&lt;br /&gt;
&lt;br /&gt;
This issue is normally down to one of two causes&lt;br /&gt;
&lt;br /&gt;
1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options-&amp;gt;Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided ZM_CAN_STREAM is set to auto and ZM_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039;: If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author&amp;#039;s name (as opposed to seeing the streaming images), you may need to chmod your cambozola.jar:&lt;br /&gt;
&lt;br /&gt;
  $ sudo chmod 775 cambozola.jar&lt;br /&gt;
&lt;br /&gt;
Once I did this, images started to stream for me.&lt;br /&gt;
&lt;br /&gt;
2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like &amp;lt;pre&amp;gt;ScriptAlias /cgi-bin/ &amp;quot;/var/www/cgi-bin/&amp;quot;&amp;lt;/pre&amp;gt; where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options-&amp;gt;Paths-&amp;gt;ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs.&lt;br /&gt;
&lt;br /&gt;
===I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don&amp;#039;t all my cameras display when I use the Montage view in FireFox?===&lt;br /&gt;
&lt;br /&gt;
By default FireFox only supports a small number of simultaneous connections. Using the montage view usually requires one persistent connection for each camera plus intermittent connections for other information such as statuses.&lt;br /&gt;
&lt;br /&gt;
You will need to increase the number of allowed connections to use the montage view with more than a small number of cameras.  Certain FireFox extensions such as FasterFox may also help to achieve the same result.&lt;br /&gt;
&lt;br /&gt;
To resolve this situation, follow the instructions below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Enter about:config in the address bar&lt;br /&gt;
&lt;br /&gt;
scroll down to&lt;br /&gt;
browser.cache.check_doc_frequency 3&lt;br /&gt;
change the 3 to a 1&lt;br /&gt;
&lt;br /&gt;
browser.cache.disk.enable True -&amp;gt; False&lt;br /&gt;
network.http.max-connections-per-server -&amp;gt; put a value of 100&lt;br /&gt;
network.http.max-persistent-connections-per-proxy -&amp;gt; 100 again&lt;br /&gt;
network.http.max-persistent-connections-per-server -&amp;gt; 100 again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Why is ZoneMinder using so much CPU?===&lt;br /&gt;
&lt;br /&gt;
The various elements of ZoneMinder can be involved in some pretty intensive activity, especially while analysing images for motion. However generally this should not overwhelm your machine unless it is very old or underpowered.&lt;br /&gt;
&lt;br /&gt;
There are a number of specific reasons why processor loads can be high either by design or by accident. To figure out exactly what is causing it in your circumstances requires a bit of experimentation.&lt;br /&gt;
&lt;br /&gt;
The main causes are.&lt;br /&gt;
&lt;br /&gt;
# Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn&amp;#039;t support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into &amp;#039;Monitor&amp;#039; mode so that only the capture daemons are running and monitor the process load of these (the &amp;#039;zmc&amp;#039; processes) using top. Try it with various palettes to see if it makes a difference.&lt;br /&gt;
# Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced.&lt;br /&gt;
# Capture frame rates. Unless there&amp;#039;s a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected.&lt;br /&gt;
# Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase.&lt;br /&gt;
# Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don&amp;#039;t want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events.&lt;br /&gt;
# Optimise your settings. After you&amp;#039;ve got some settings you&amp;#039;re happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones.&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;m sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there&amp;#039;s no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also.&lt;br /&gt;
&lt;br /&gt;
I think the biggest factors are image size, colour depth and capture rate. Having said that I also don&amp;#039;t always know why you get certains results from &amp;#039;top&amp;#039;. For instance if I have a &amp;#039;zma&amp;#039; daemon running for a monitor that is capturing an image. I&amp;#039;ve commented out the actual analysis so all it&amp;#039;s doing is blending the image with the previous one. In colour mode this takes ~11 milliseconds per frame on my system and the camera is capturing at ~10fps. Using &amp;#039;top&amp;#039; this reports the process as using ~5% of CPU and permanently in R(un) state. Changing to greyscale mode the blending takes ~4msec (as you would expect as this is roughly a third of 11) but top reports the process as now with 0% CPU and permanently in S(leep) state. So an actual CPU resource usage change of a factor of 3 causes huge differences in reported CPU usage. I have yet to get to the bottom of this but I suspect it&amp;#039;s to do with scheduling somewhere along the line and that maybe the greyscale processing will fit into one scheduling time slice whereas the colour one won&amp;#039;t but I have no evidence of this yet!&lt;br /&gt;
&lt;br /&gt;
===Why is the timeline view all messed up?===&lt;br /&gt;
&lt;br /&gt;
The timeline view is a new view allowing you to see a graph of alarm activity over time and to quickly scan and home in on events of interest. However this feature is highly complex and still in beta. It is based extensively on HTML div tags, sometimes lots of them. Whilst FireFox is able to render this view successfully other browsers, particular Internet Explorer do not seem able to cope and so present a messed up view, either always or when there are a lot of events.&lt;br /&gt;
Using the timeline view is only recommended when using FireFox, however even then there may be issues.&lt;br /&gt;
&lt;br /&gt;
===How much Hard Disk Space / Bandwidth do I need for ZM?===&lt;br /&gt;
Please see [http://www.jpwilson.eu/ZM_Utils/ZM%20storage%20calc%20sheet.xls Storage Calc] in excel format&lt;br /&gt;
&lt;br /&gt;
Or go to [http://www.axis.com/products/video/design_tool/index.htm this link] for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera.&lt;br /&gt;
&lt;br /&gt;
As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used.&lt;br /&gt;
&lt;br /&gt;
===When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won&amp;#039;t start===&lt;br /&gt;
Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions ([http://en.wikipedia.org/wiki/Selinux]).&lt;br /&gt;
If you are seeing entries in your system log like:&lt;br /&gt;
&lt;br /&gt;
   Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068&lt;br /&gt;
   comm=&amp;quot;uptime&amp;quot; name=&amp;quot;utmp&amp;quot; dev=dm-0 ino=16908345 scontext=user_u:system_r:httpd_sys_script_t&lt;br /&gt;
   tcontext=user_u:object_r:initrc_var_run_t tclass=file&lt;br /&gt;
&lt;br /&gt;
then it is likely that your system has SELinux enabled and it is preventing ZoneMinder from performaing certain activities. You then have two choices. You can either tune SELinux to permit the required operations or you can disable SELinux entirely which will permit ZoneMinder to run unhindered. Disabling SELinux is usually performed by editing it&amp;#039;s configuration file (e.g., &amp;lt;tt&amp;gt;/etc/selinux/config&amp;lt;/tt&amp;gt;) and then rebooting. However if you run a public server you should read up on the risks associated with disabled Secure Linux before disabling it.&lt;br /&gt;
&lt;br /&gt;
Note that SELinux may cause errors other than those listed above. If you are in any doubt then it can be worth disabling SELinux experimentally to see if it fixes your problem before trying other solutions.&lt;br /&gt;
&lt;br /&gt;
=== How do I enable ZoneMinder&amp;#039;s security? ===&lt;br /&gt;
In the console, click on Options. Check the box next to &amp;quot;ZM_OPT_USE_AUTH&amp;quot;. You will immediately be asked to login. The username is &amp;#039;admin&amp;#039; and the password is &amp;#039;admin&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;To Manage Users:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
In main console, go to &amp;#039;&amp;#039;&amp;#039;Options-&amp;gt;Users&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features;&lt;br /&gt;
&lt;br /&gt;
=== Why does ZM stop recording once I have 32000 events for my monitor? ===&lt;br /&gt;
This is a limitation of the ext3 filesystem that most Linux distributions use. One directory cannot hold more than 32k approx  files.&lt;br /&gt;
&lt;br /&gt;
Version of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit this is also somewhat  faster. However it is relatively and although few issues have been reported thus far it should be considered in beta for now. Also, it is currently not possible to migrate saved events between the different storage formats so is only suitable for new installations or if you do not mind losing saved events.&lt;br /&gt;
&lt;br /&gt;
So if you do not want to use the deeper filesystem option&lt;br /&gt;
(Options-&amp;gt;Paths-&amp;gt;ZM_USE_DEEP_STORAGE), for now you have to reduce the&lt;br /&gt;
number of events or store your images (e.g. /var/lib/zoneminder) on a&lt;br /&gt;
partition that uses a different filesystem such as ext4 or reiserfs.&lt;br /&gt;
&lt;br /&gt;
You can read about the lack of a limit in the number of&lt;br /&gt;
sub-directories in the ext4 filesystem at:&lt;br /&gt;
  http://kernelnewbies.org/Ext4&lt;br /&gt;
and see what tools may assist in your use of this filesystem in:&lt;br /&gt;
  http://ext4.wiki.kernel.org/index.php/Ext4_Howto&lt;br /&gt;
Note that while GParted 0.5.2 recognizes ext4 partitions, at least in&lt;br /&gt;
some circumstances it does not succeed in formatting a partition for&lt;br /&gt;
the ext4 filesystem.  Also, if you search for ext3 or reiserfs on the&lt;br /&gt;
forums you will find various threads on this issue with guidance on&lt;br /&gt;
how to convert.&lt;br /&gt;
&lt;br /&gt;
== Managing system load &amp;#039;&amp;#039;(with IP Cameras in mind)&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Zoneminder is a superb application in every way, but it does a job that needs a lot of horsepower especially when using multiple IP cameras. IP Cams require an extra level of processing to analogue cards as the jpg or mjpeg images need to be decoded before analysing. This needs grunt. If you have lots of cameras, you need lots of grunt.&lt;br /&gt;
&lt;br /&gt;
Why do ZM need so much grunt?&lt;br /&gt;
Think what Zoneminder is actually doing. In modect mode ZM is:&lt;br /&gt;
1. Fetching a jpeg from the camera. (Either in single part or multipart stream)&lt;br /&gt;
2. Decoding the jpeg image. &lt;br /&gt;
3. Comparing the zoned selections to the previous image or images and applying rules.&lt;br /&gt;
4. If in alarm state, writing that image to the disk and updating the mysql database.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re capturing at five frames per second, the above is repeated five times every second, multiplied by the number of cameras. Decoding the images is what takes the real power from the processor and this is the main reason why analogue cameras which present an image ready-decoded in memory take less work.&lt;br /&gt;
&lt;br /&gt;
=== How do I know if my computer is overloaded? ===&lt;br /&gt;
If your CPU is running at 100% all the time, it&amp;#039;s probably overloaded (or running at exact optimisation). If the load is consistently high (over 10.0 for a single processor) then Bad Things happen - like lost frames, unrecorded events etc. Occasional peaks are fine, normal and nothing to worry about.&lt;br /&gt;
&lt;br /&gt;
Zoneminder runs on Linux, Linux measures system load using &amp;quot;load&amp;quot;, which is complicated but gives a rough guide on what the computer is doing at any given time. Zoneminder shows Load on the main page (top right) as well as disk space. Typing &amp;quot;uptime&amp;quot; on the command line will give a similar guide, but with three figures to give a fuller measure of what&amp;#039;s happening over a period of time but for the best guide to see what&amp;#039;s happening, install &amp;quot;htop&amp;quot; - which gives easy to read graphs for load, memory and cpu usage.&lt;br /&gt;
&lt;br /&gt;
A load of 1.0 means the processor has &amp;quot;just enough to do right now&amp;quot;. Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor&amp;#039;s workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it&amp;#039;ll just keep churning away until it&amp;#039;s done. However - Zoneminder needs to process information in real time so it can&amp;#039;t afford to stack its jobs, it needs to deal with them right away.&lt;br /&gt;
&lt;br /&gt;
For a better and full explanation of Load: http://en.wikipedia.org/wiki/Load_%28computing%29&lt;br /&gt;
&lt;br /&gt;
=== My load is too high, how can I reduce it? ===&lt;br /&gt;
Zoneminder is /very/ tweakable and it&amp;#039;s possible to tune it to compromise. The following are good things to try, in no particular order;&lt;br /&gt;
&lt;br /&gt;
Change the jpeg libraries. In most distributions Linux uses standard jpeg libraries which although fine for most things, don&amp;#039;t use the MMX functions in nearly all modern processors. Check whether your cpu supports mmx by running &amp;quot;cpuid |grep MMX&amp;quot; which should give you a line or two along the lines of &amp;quot;MMX instructions&amp;quot;. If so, give the libs a try. Most people report their load halves simply by using these libs. You may be able to experience substantial Zoneminder performance boosts now by merely upgrading your operating system, without having to download libraries and compile your own binaries, etc. as described in the forum thread linked below.  Some distributions, e.g. Fedora 14 now include library code to utilize the instruction set extensions available in your processor: &lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Fedora_14_Alpha_release_notes#Faster_JPEG_Compression.2FDecompression&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The replacement of libjpeg with libjpeg-turbo brings speed improvements to a wide range of applications when handling images in JPEG format ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  http://fedoraproject.org/wiki/Releases/14/Schedule&lt;br /&gt;
&lt;br /&gt;
still states &amp;quot;2010-11-02 final release&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  http://libjpeg-turbo.virtualgl.org/&lt;br /&gt;
&lt;br /&gt;
provides some history on its project page.  If you seek confirmation for which library is in use, you may consider querying e.g. while running on a prior distribution:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-6b-46.fc12.i686&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and comparing the response to querying when the higher-performance library is available:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ rpm -q --whatprovides libjpeg&lt;br /&gt;
libjpeg-turbo-1.0.1-1.fc14.x86_64&lt;br /&gt;
[u@who ~]$ &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As noted in other forum postings, some zoneminder camera and usage configurations may not make much use of jpeg processing (e.g. some webcams), and thus obtain little performance benefit.  Otherwise, you should be able to select one or more of:&lt;br /&gt;
* running more cameras,&lt;br /&gt;
* running existing cameras at higher image resolutions,&lt;br /&gt;
* running cameras at a faster frame rate,&lt;br /&gt;
* saving MoDect images with higher quality,&lt;br /&gt;
* having more CPU cycles available for any non-Zoneminder workload, etc.&lt;br /&gt;
&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?t=6419 gives more info on the download-the-library-yourself, compile-your-own-Zoneminder binary, etc. approach if needed. Nobody&amp;#039;s posted there to say it broke their system... Yet.&lt;br /&gt;
&lt;br /&gt;
If your camera allows you to change image size, think whether you can get away with smaller images. Smaller pics = less load. 320x240 is usually ok for close-up corridor shots.&lt;br /&gt;
&lt;br /&gt;
Go Black and White. Colour pictures use twice to three times the CPU, memory and diskspace but give little benefit to identification.&lt;br /&gt;
&lt;br /&gt;
Reduce frames per second. Halve the fps, halve the workload. If your camera supports fps throttling (Axis do), try that - saves ZM having to drop frames from a stream. 2-5 fps seems to be widely used.&lt;br /&gt;
&lt;br /&gt;
Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV.&lt;br /&gt;
&lt;br /&gt;
Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more.&lt;br /&gt;
&lt;br /&gt;
Schedule. If you are running a linux system at near capacity, you&amp;#039;ll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that &amp;#039;locate&amp;#039; works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the &amp;quot;nice&amp;quot; command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start)&lt;br /&gt;
&lt;br /&gt;
Reduce clutter on your PC. Don&amp;#039;t run X unless you really need it, the GUI is a huge overhead in both memory and cpu.&lt;br /&gt;
&lt;br /&gt;
More expensive options:&lt;br /&gt;
&lt;br /&gt;
Increase RAM. If your system is having to use disk swap it will HUGELY impact performance in all areas. Again, htop is a good monitor - but first you need to understand that because Linux is using all the memory, it doesn&amp;#039;t mean it needs it all - linux handles ram very differently to Windows/DOS and caches stuff. htop will show cached ram as a different colour in the memory graph. Also check that you&amp;#039;re actually using a high memory capable kernel - many kernels don&amp;#039;t enable high memory by default. &lt;br /&gt;
&lt;br /&gt;
Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors.&lt;br /&gt;
&lt;br /&gt;
Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[u@who ~]$ ./configure CFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot; CXXFLAGS=&amp;quot;-g -O3 -march=athlon-xp -mtune=athlon-xp&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The above command is optimised for an Athlon XP cpu so you will need to use the specific tag for your cpu, you will also have to put your normal ./configure commands in.&lt;br /&gt;
Processor specific commands can be found in the GCC manual&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What about disks and bandwidth? ===&lt;br /&gt;
&lt;br /&gt;
In most modern pc-based servers, disk I/O is more than adequate for the speeds involved in capturing from multiple cameras in most scenarios.&lt;br /&gt;
&lt;br /&gt;
A typical 100mbit LAN will cope with most setups easily. If you&amp;#039;re feeding from cameras over smaller or internet links, obviously fps will be much lower.&lt;br /&gt;
&lt;br /&gt;
Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Building ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
===I cannot build ZoneMinder and am getting lots of undefined C++ template errors===&lt;br /&gt;
&lt;br /&gt;
This is almost certainly due to the &amp;#039;ccache&amp;#039; package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager.&lt;br /&gt;
&lt;br /&gt;
=== How do I build for X10 support? ===&lt;br /&gt;
&lt;br /&gt;
You do not need to rebuild ZM for X10 support. You will need to install the perl module and switch on X10 in the options, then restart. Installing the perl module is covered in the README amongst other places but in summary, do:&lt;br /&gt;
&lt;br /&gt;
 perl -MCPAN -eshell&lt;br /&gt;
 install X10::ActiveHome&lt;br /&gt;
 quit&lt;br /&gt;
&lt;br /&gt;
== Extending ZoneMinder ==&lt;br /&gt;
&lt;br /&gt;
=== How can I get ZM to do different things at different times of day or week? ===&lt;br /&gt;
If you want to configure ZoneMinder to do motion detection during the day and just record at night, for example, you will need to use ZoneMinder &amp;#039;run states&amp;#039;. A run state is a particular configuration of monitor functions that you want to use at any time.&lt;br /&gt;
&lt;br /&gt;
To save a run state you should first configure your monitors for Modect, Record, Monitor etc as you would want them during one of the times of day. Then click on the running state link at the top of the Console view. This will usually say &amp;#039;Running&amp;#039; or &amp;#039;Stopped&amp;#039;. You will then be able to save the current state and give it a name, &amp;#039;Daytime&amp;#039; for example. Now configure your monitors how you would want them during other times of day and save that, for instance as &amp;#039;Nighttime&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command &amp;#039;&amp;#039;zmpkg.pl &amp;lt;run state&amp;gt;&amp;#039;&amp;#039;, for example &amp;#039;&amp;#039;zmpkg.pl Daytime&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The final step you need to take, is scheduling the time the changes take effect. For this you can use [http://en.wikipedia.org/wiki/Cron cron]. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,&lt;br /&gt;
&amp;lt;pre&amp;gt;0 8 * * * /usr/local/bin/zmpkg.pl Daytime&lt;br /&gt;
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 7.04 and possibly others, look in /usr/bin not just /usr/local/bin for the zmpkg.pl file.&lt;br /&gt;
&lt;br /&gt;
Although the example above describes changing states at different times of day, the same principle can equally be applied to days of the week or other more arbitrary periods.&lt;br /&gt;
&lt;br /&gt;
For an alternative method of time controlling ZoneMinder, forum user &amp;#039;voronwe&amp;#039; has created a more interactive calendar style integration. Details of this can be found in this [http://www.zoneminder.com/forums/viewtopic.php?t=6519 forum thread]. If you would like to find out more about this contribution please post on this thread.&lt;br /&gt;
&lt;br /&gt;
=== How can I use ZoneMinder to trigger something else when there is an alarm? ===&lt;br /&gt;
ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing &amp;#039;perdoc ZoneMinder&amp;#039;, &amp;#039;perldoc ZoneMinder::SharedMem&amp;#039; etc.&lt;br /&gt;
Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/usr/bin/perl -w&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
&lt;br /&gt;
use ZoneMinder;&lt;br /&gt;
&lt;br /&gt;
$| = 1;&lt;br /&gt;
&lt;br /&gt;
zmDbgInit( &amp;quot;myscript&amp;quot;, level=&amp;gt;0, to_log=&amp;gt;0, to_syslog=&amp;gt;0, to_term=&amp;gt;1 );&lt;br /&gt;
&lt;br /&gt;
my $dbh = DBI-&amp;gt;connect( &amp;quot;DBI:mysql:database=&amp;quot;.ZM_DB_NAME.&amp;quot;;host=&amp;quot;.ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS );&lt;br /&gt;
&lt;br /&gt;
my $sql = &amp;quot;select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != &amp;#039;None&amp;#039; group by (M.Id)&amp;quot;;&lt;br /&gt;
my $sth = $dbh-&amp;gt;prepare_cached( $sql ) or die( &amp;quot;Can&amp;#039;t prepare &amp;#039;$sql&amp;#039;: &amp;quot;.$dbh-&amp;gt;errstr() );&lt;br /&gt;
&lt;br /&gt;
my $res = $sth-&amp;gt;execute() or die( &amp;quot;Can&amp;#039;t execute &amp;#039;$sql&amp;#039;: &amp;quot;.$sth-&amp;gt;errstr() );&lt;br /&gt;
my @monitors;&lt;br /&gt;
while ( my $monitor = $sth-&amp;gt;fetchrow_hashref() )&lt;br /&gt;
{&lt;br /&gt;
    push( @monitors, $monitor );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
while( 1 )&lt;br /&gt;
{&lt;br /&gt;
    foreach my $monitor ( @monitors )&lt;br /&gt;
    {&lt;br /&gt;
        next if ( !zmMemVerify( $monitor ) );&lt;br /&gt;
 &lt;br /&gt;
        if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor-&amp;gt;{LastEventId} ) )&lt;br /&gt;
        {&lt;br /&gt;
            $monitor-&amp;gt;{LastEventId} = $last_event_id;&lt;br /&gt;
            print( &amp;quot;Monitor &amp;quot;.$monitor-&amp;gt;{Name}.&amp;quot; has alarmed\n&amp;quot; );&lt;br /&gt;
            #&lt;br /&gt;
            # Do your stuff here&lt;br /&gt;
            #&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    sleep( 1 );&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Trouble Shooting==&lt;br /&gt;
Here are some things that will help you track down whats wrong.&lt;br /&gt;
This is also how to obtain the info that we need to help you on the forums.&lt;br /&gt;
&lt;br /&gt;
===What logs should I check for errors?===&lt;br /&gt;
ZoneMinder creates its own logs and are usually located in the &amp;lt;tt&amp;gt;/tmp&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder logs for the RPM packages are located in &amp;lt;tt&amp;gt;/var/log/zm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Depending on your problem errors can show up in any of these logs but, usually the logs of interest are &amp;lt;tt&amp;gt;zmdc.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;zmpkg.log&amp;lt;/tt&amp;gt; if ZM is not able to start.&lt;br /&gt;
&lt;br /&gt;
Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components.&lt;br /&gt;
Other logs of interest are:&amp;lt;tt&amp;gt;&lt;br /&gt;
*/var/log/messages and/or /var/log/syslog&lt;br /&gt;
*/var/log/dmesg&lt;br /&gt;
*/var/log/httpd/error_log&amp;lt;/tt&amp;gt; (RedHat/Fedora) or &amp;lt;tt&amp;gt;/var/log/apache2/error_log&lt;br /&gt;
*/var/log/mysqld.log&amp;lt;/tt&amp;gt; (Errors here don&amp;#039;t happen very often but just in case)&lt;br /&gt;
&lt;br /&gt;
If ZM is not functioning, you should always be able to find an error in at least one of these logs. Use the [[tail]] command to get info from the logs. This can be done like so: &lt;br /&gt;
&lt;br /&gt;
  tail -f /var/log/messages /var/log/httpd/error_log /var/log/zm/zm*.log&lt;br /&gt;
&lt;br /&gt;
This will append any data entered to any of these logs to your console screen (&amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt;). To exit, hit [ctrl -c].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the &amp;quot;?&amp;quot; marks.&lt;br /&gt;
&lt;br /&gt;
===How can I trouble shoot the hardware and/or software?===&lt;br /&gt;
Here are some commands to get information about your hardware. Some commands are distribution dependent.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lspci]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detailed info. Check for conflicting interrupts or port assignments. You can sometimes alter interrupts/ ports in bios. Try a different pci slot to get a clue if it is HW conflict (comand provided by the pciutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[scanpci]] -v&amp;lt;/tt&amp;gt;  -- Gives you information from your hardware EPROM&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[lsusb]] -vv&amp;lt;/tt&amp;gt; -- Returns lots of detail about USB devices (camand provided by usbutils package).&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[dmesg]]&amp;lt;/tt&amp;gt; -- Shows you how your hardware initialized (or didn&amp;#039;t) on boot-up. You will get the most use of this.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[v4l-info]]&amp;lt;/tt&amp;gt; -- to see how driver is talking to card. look for unusual values.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[modinfo bttv]]&amp;lt;/tt&amp;gt; -- some bttv driver stats.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[zmu]]  -m 0 -q -v&amp;lt;/tt&amp;gt; -- Returns various information regarding a monitor configuration.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcs]] &amp;lt;/tt&amp;gt;  -- Provides information on the ipc facilities for which the calling process has read acccess.&lt;br /&gt;
* &amp;lt;tt&amp;gt;[[ipcrm]] &amp;lt;/tt&amp;gt;  -- The ipcrm command can be used to remove an IPC object from the kernel.&lt;br /&gt;
* &amp;lt;tt&amp;gt;cat /proc/interrupts&amp;lt;/tt&amp;gt;  -- This will dispaly what interrupts your hardware is using.&lt;br /&gt;
&lt;br /&gt;
===Why is it that when monitoring a camera, the top portion of the image is cutoff and appears at the bottom of the image, with a line seperating the top from the bottom?===&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a 403 access error with my web browser when trying to access http //localhost/zm? ===&lt;br /&gt;
&lt;br /&gt;
The apache web server needs to have the right permissions and configuration to be able to read the Zoneminder files. Check the forums for solution, and edit the apache configuration and change directory permissions to give apache the right to read the Zoneminder files. Depending on your Zoneminder configuration, you would use the zm user and group that Zoneminder was built with, such as wwwuser and www.&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting broken images when trying to view events? ===&lt;br /&gt;
&lt;br /&gt;
Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones:&lt;br /&gt;
http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754&lt;br /&gt;
&lt;br /&gt;
===Why is the image from my color camera appearing in black and white?===&lt;br /&gt;
This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab.  You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC.  Confirm the format of your analog camera by checking it&amp;#039;s technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera.  Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240.  If you have confirmed that the camera itself is NTSC format, but don&amp;#039;t get a picture using the NTSC setting, consider increasing the shared memory &amp;#039;&amp;#039;&amp;#039;kernel.shmall&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;kernel.shmmax&amp;#039;&amp;#039;&amp;#039; settings in /etc/sysctl.conf to a larger value such as 268435456.  This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue.  Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see blue screens with a timestamp when monitoring my camera?===&lt;br /&gt;
If this camera is attached to a capture card, then you may have selected the wrong Device Source or Channel when configuring the monitor in the ZoneMinder console.  If you have a capture card with 2 D-sub style inputs(looks like a VGA port) to which you attach a provided splitter that splits off multiple cables, then the splitter may be attached to the wrong port.  For example, PV-149 capture cards have two D-sub style ports labeled as DB1 and DB2, and come packaged with a connector for one of these ports that splits into 4 BNC connecters.  The initial four video ports are available with the splitter attached to DB1.&lt;br /&gt;
&lt;br /&gt;
===Why do I only see black screens with a timestamp when monitoring my camera?===&lt;br /&gt;
In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by &amp;#039;&amp;#039;&amp;#039;zmu -d &amp;lt;device_path&amp;gt; -q -v&amp;#039;&amp;#039;&amp;#039;.  32768 may be appropriate values to try for these settings.  After saving the settings, select Settings again to confirm they saved successfully.&lt;br /&gt;
&lt;br /&gt;
===I am getting messages about a backtrace in my logs, what do I do?===&lt;br /&gt;
If you are seeing entries in your log like the following&lt;br /&gt;
&amp;lt;pre&amp;gt;Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]]&lt;br /&gt;
Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete]&amp;lt;/pre&amp;gt;&lt;br /&gt;
then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type &amp;#039;man addr2line&amp;#039; for more information.&lt;br /&gt;
Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the &amp;#039;Backtrace:&amp;#039; tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the &amp;#039;[]&amp;#039; pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them.&lt;br /&gt;
So in the example above, the command would be &amp;lt;pre&amp;gt;addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9&amp;lt;/pre&amp;gt;&lt;br /&gt;
This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful.&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database?===&lt;br /&gt;
There is two ways to go about this. In most cases you can run from the command prompt -&amp;gt;&lt;br /&gt;
* mysqlcheck --all-databases --auto-repair -p&amp;#039;&amp;#039;&amp;#039;your_database_password&amp;#039;&amp;#039;&amp;#039; -u &amp;#039;&amp;#039;&amp;#039;your_databse_user&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -&amp;gt;&lt;br /&gt;
* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How do I repair the MySQL Database when the cli fails?===&lt;br /&gt;
In Ubuntu, the commands listed above do not seem to work.  However, actually doing it by hand from within MySQL does.  (But that is beyond the scope of this document)  But that got me thinking...  And phpmyadmin does work.  Bring up a terminal.&lt;br /&gt;
 sudo apt-get install phpmyadmin&lt;br /&gt;
&lt;br /&gt;
Now go to http://zoneminder_IP/ and stop the ZM service.  Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database.  Select and tables marked &amp;#039;in use&amp;#039; and pick the action &amp;#039;repare&amp;#039; to fix.  Restart the zoneminder service from the web browser.  Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker.&lt;br /&gt;
 sudo apt-get remove phpmyadmin&lt;br /&gt;
&lt;br /&gt;
===I upgraded by distribution and ZM stopped working===&lt;br /&gt;
Some possibilties (Incomplete list and subject to correction)&lt;br /&gt;
#[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0&amp;#039; not found (required by /usr/local/bin/zmfix)]]  :: Solution: Recompile and reinstall Zoneminder.&lt;br /&gt;
Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder.&lt;br /&gt;
&lt;br /&gt;
===Zoneminder doesn&amp;#039;t start automatically on boot===&lt;br /&gt;
Check the list for log entries like &amp;quot;zmfix[766]: ERR [Can&amp;#039;t connect to server: Can&amp;#039;t connect to local MySQL server through socket &amp;#039;/var/run/mysqld/mysqld.sock&amp;#039; (2)] &amp;quot;. &lt;br /&gt;
What can happen is that zoneminder is started too quickly after Mysql and tries to contact the database server before it&amp;#039;s ready. Zoneminder gets no answer and aborts. &lt;br /&gt;
August 2010 - Ubuntu upgrades seem to be leaving several systems in this state. One way around this is to add a delay to the zoneminder startup script allowing Mysql to finish starting. &lt;br /&gt;
&amp;quot;Simply adding &amp;#039;sleep 15&amp;#039; in the line above &amp;#039;zmfix -a&amp;#039; in the /etc/init.d/zoneminder file fixed my ZoneMinder startup problems!&amp;quot; - credit to Pada.&lt;br /&gt;
&lt;br /&gt;
=== Remote Path setup for Panasonic and other Camera ===&lt;br /&gt;
On adding or editing the source you can select the preset link for the parameters for the specified camera .  In version 1.23.3  presets for BTTV,Axis,Panasonic,GadSpot,VEO, and BlueNet are available . Selecting the presets  ZM fills up the required value for the remote path variable&lt;br /&gt;
&lt;br /&gt;
=== Why do I get repeated/ mixed/unstable/ blank monitors on bt878-like cards (a.k.a. PICO 2000) ===&lt;br /&gt;
&lt;br /&gt;
Please have a check at [[Pico2000]];&lt;br /&gt;
&lt;br /&gt;
===What causes &amp;quot;Invalid JPEG file structure: two SOI markers&amp;quot; from zmc (1.24.x)===&lt;br /&gt;
&lt;br /&gt;
Some settings that used to be global only are now per camera.  On the Monitor Source tab, if you are using Remote Protocol  &amp;quot;HTTP&amp;quot; and Remote Method &amp;quot;Simple&amp;quot;, try changing Remote Method to &amp;quot;Regexp&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
=== I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? ===&lt;br /&gt;
&lt;br /&gt;
The ZoneMinder license is described at the end of the documentation and consists of the following section&lt;br /&gt;
&lt;br /&gt;
 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as&lt;br /&gt;
 published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.&lt;br /&gt;
 &lt;br /&gt;
 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty&lt;br /&gt;
 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&lt;br /&gt;
&lt;br /&gt;
This means that ZoneMinder is licensed under the terms described [http://www.gnu.org/copyleft/gpl.html here]. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue.&lt;br /&gt;
&lt;br /&gt;
=== Can I use ZoneMinder as part of my commercial product? ===&lt;br /&gt;
&lt;br /&gt;
The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms.  The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circuumstances.&lt;/div&gt;</summary>
		<author><name>Clipo</name></author>
	</entry>
</feed>