zed

package: zfs-zed

title: zed(8)

summary: ZFS Event Daemon

text:
# zed(8)

## NAME
ZED — ZFS Event Daemon

## SYNOPSIS
ZED

[-fFhILMvVZ] [-d zedletdir] [-p pidfile] [-P path] [-s statefile] [-j jobs] [-b buflen]

## DESCRIPTION
The ZED (ZFS Event Daemon) monitors events generated by the ZFS kernel module. When a zevent (ZFS Event) is posted, the ZED will run any ZEDLETs (ZFS Event Daemon Linkage for Executable Tasks) that have been enabled for the corresponding zevent class.

## OPTIONS
-h

Display a summary of the command-line options.

-L

Display license information.

-V

Display version information.

-v

Be verbose.

-f

Force the daemon to run if at all possible, disabling security checks and throwing caution to the wind. Not recommended for use in production.

-F

Don't daemonize: remain attached to the controlling terminal, log to the standard I/O streams.

-M

Lock all current and future pages in the virtual memory address space. This may help the daemon remain responsive when the system is under heavy memory pressure.

-I

Request that the daemon idle rather than exit when the kernel modules are not loaded. Processing of events will start, or resume, when the kernel modules are (re)loaded. Under Linux the kernel modules cannot be unloaded while the daemon is running.

-Z

Zero the daemon's state, thereby allowing zevents still within the kernel to be reprocessed.

-d zedletdir

Read the enabled ZEDLETs from the specified directory.

-p pidfile

Write the daemon's process ID to the specified file.

-P path

Custom $PATH for zedlets to use. Normally zedlets run in a locked-down environment, with hardcoded paths to the ZFS commands ($ZFS, $ZPOOL, $ZED, …), and a hard-coded $PATH. This is done for security reasons. However, the ZFS test suite uses a custom PATH for its ZFS commands, and passes it to ZED with -P. In short, -P is only to be used by the ZFS test suite; never use it in production!

-s statefile

Write the daemon's state to the specified file.

-j jobs

Allow at most jobs ZEDLETs to run concurrently, delaying execution of new ones until they finish. Defaults to 16.

-b buflen

Cap kernel event buffer growth to buflen entries. This buffer is grown when the daemon misses an event, but results in unreclaimable memory use in the kernel. A value of 0 removes the cap. Defaults to 1048576.

## ZEVENTS
A zevent is comprised of a list of nvpairs (name/value pairs). Each zevent contains an EID (Event IDentifier) that uniquely identifies it throughout the lifetime of the loaded ZFS kernel module; this EID is a monotonically increasing integer that resets to 1 each time the kernel module is loaded. Each zevent also contains a class string that identifies the type of event. For brevity, a subclass string is defined that omits the leading components of the class string. Additional nvpairs exist to provide event details.

The kernel maintains a list of recent zevents that can be viewed (along with their associated lists of nvpairs) using the zpool events -v command.

## CONFIGURATION
ZEDLETs to be invoked in response to zevents are located in the enabled-zedlets directory (zedletdir). These can be symlinked or copied from the installed-zedlets directory; symlinks allow for automatic updates from the installed ZEDLETs, whereas copies preserve local modifications. As a security measure, since ownership change is a privileged operation, ZEDLETs must be owned by root. They must have execute permissions for the user, but they must not have write permissions for group or other. Dotfiles are ignored.

ZEDLETs are named after the zevent class for which they should be invoked. In particular, a ZEDLET will be invoked for a given zevent if either its class or subclass string is a prefix of its filename (and is followed by a non-alphabetic character). As a special case, the prefix all matches all zevents. Multiple ZEDLETs may be invoked for a given zevent.

## ZEDLETS
ZEDLETs are executables invoked by the ZED in response to a given zevent. They should be written under the presumption they can be invoked concurrently, and they should use appropriate locking to access any shared resources. The one exception to this are "synchronous zedlets", which are described later in this page. Common variables used by ZEDLETs can be stored in the default rc file which is sourced by scripts; these variables should be prefixed with ZED_.

The zevent nvpairs are passed to ZEDLETs as environment variables. Each nvpair name is converted to an environment variable in the following manner:

- it is prefixed with ZEVENT_,

- it is converted to uppercase, and

- each non-alphanumeric character is converted to an underscore.

Some additional environment variables have been defined to present certain nvpair values in a more convenient form. An incomplete list of zevent environment variables is as follows:

ZEVENT_EID

The Event IDentifier.

ZEVENT_CLASS

The zevent class string.

ZEVENT_SUBCLASS

The zevent subclass string.

ZEVENT_TIME

The time at which the zevent was posted as “seconds nanoseconds” since the Epoch.

ZEVENT_TIME_SECS

The seconds component of ZEVENT_TIME.

ZEVENT_TIME_NSECS

The nanoseconds component of ZEVENT_TIME.

ZEVENT_TIME_STRING

An almost-RFC3339-compliant string for ZEVENT_TIME.

Additionally, the following ZED & ZFS variables are defined:

ZED_PID

The daemon's process ID.

ZED_ZEDLET_DIR

The daemon's current enabled-zedlets directory.

ZFS_ALIAS

The alias (“name-version-release”) string of the ZFS distribution the daemon is part of.

ZFS_VERSION

The ZFS version the daemon is part of.

ZFS_RELEASE

The ZFS release the daemon is part of.

ZEDLETs may need to call other ZFS commands. The installation paths of the following executables are defined as environment variables: ZDB, ZED, ZFS, ZINJECT, and ZPOOL. These variables may be overridden in the rc file.

## Synchronous ZEDLETS
ZED's normal behavior is to spawn off zedlets in parallel and ignore their completion order. This means that ZED can potentially have zedlets for event ID number 2 starting before zedlets for event ID number 1 have finished. Most of the time this is fine, and it actually helps when the system is getting hammered with hundreds of events.

However, there are times when you want your zedlets to be executed in sequence with the event ID. That is where synchronous zedlets come in.

ZED will wait for all previously spawned zedlets to finish before running a synchronous zedlet. Synchronous zedlets are guaranteed to be the only zedlet running. No other zedlets may run in parallel with a synchronous zedlet. Users should be careful to only use synchronous zedlets when needed, since they decrease parallelism.

To make a zedlet synchronous, simply add a "-sync-" immediately following the event name in the zedlet's file name:

EVENT_NAME-sync-ZEDLETNAME.sh

For example, if you wanted a synchronous statechange script:

statechange-sync-myzedlet.sh

## FILES
/etc/zfs/zed.d

The default directory for enabled ZEDLETs.

/etc/zfs/zed.d/zed.rc

The default rc file for common variables used by ZEDLETs.

/usr/libexec/zfs/zed.d

The default directory for installed ZEDLETs.

/var/run/zed.pid

The default file containing the daemon's process ID.

/var/run/zed.state

The default file containing the daemon's state.

## SIGNALS
SIGHUP

Reconfigure the daemon and rescan the directory for enabled ZEDLETs.

SIGTERM, SIGINT

Terminate the daemon.

## SEE ALSO
zfs(8), zpool(8), zpool-events(8)

## NOTES
The ZED requires root privileges.

Do not taunt the ZED.

## BUGS
ZEDLETs are unable to return state/status information to the kernel.

Internationalization support via gettext has not been added.


zmaudit.pl

package: zoneminder

title: zmaudit.pl(8)

text:
# zmaudit.pl(8)

## NAME
zmaudit.pl - ZoneMinder event file system and database consistency checker

## SYNOPSIS

```
 zmaudit.pl [-r,-report|-i,-interactive]
```

## DESCRIPTION
This script checks for consistency between the event filesystem and the database. If events are found in one and not the other they are deleted (optionally). Additionally any monitor event directories that do not correspond to a database monitor are similarly disposed of. However monitors in the database that don't have a directory are left alone as this is valid if they are newly created and have no events yet.

## OPTIONS

```
 -c, --continuous           - Run continuously
 -f, --force                - Run even if pid file exists
 -i, --interactive          - Ask before applying any changes
 -m, --monitor_id           - Only consider the given monitor
 -r, --report               - Just report don't actually do anything
 -s, --storage_id           - Specify a storage area to audit instead of all
 -v, --version              - Print the installed version of ZoneMinder
```


zmc

title: zmc(8)

summary: The ZoneMinder Capture daemon

text:
# zmc(8)

## NAME
zmc - The ZoneMinder Capture daemon

## SYNOPSIS

```
 zmc -d <device_path>
 zmc --device <device_path>
 zmc -f <file_path>
 zmc --file <file_path>
 zmc -m <monitor_id>
 zmc --monitor <monitor_id>
 zmc -h
 zmc --help
 zmc -v
 zmc --version
```

## DESCRIPTION
This binary's job is to sit on a video device and suck frames off it as fast as possible, this should run at more or less constant speed.

## OPTIONS

```
 -d, --device <device_path>         - For local cameras, device to access. e.g /dev/video0 etc
 -f, --file <file_path>           - For local images, jpg file to access.
 -m, --monitor_id             - ID of the monitor to analyse
 -h, --help                 - Display usage information
 -v, --version              - Print the installed version of ZoneMinder
```


zmcamtool.pl

title: zmcamtool.pl(8)

text:
# zmcamtool.pl(8)

## NAME
zmcamtool.pl - ZoneMinder tool to import camera controls and presets

## SYNOPSIS

```
 zmcamtool.pl [--user=<dbuser> --pass=<dbpass>]
              [--import [file.sql] [--overwrite]]
              [--export [name]]
              [--topreset id [--noregex]]
```

## DESCRIPTION
This script provides a way to import new ptz camera controls & camera presets into existing zoneminder systems. This script also provides a way to export ptz camera controls & camera presets from an existing zoneminder system into a sql file, which can then be easily imported to another zoneminder system.

## OPTIONS

```
 --export            - Export all camera controls and presets to STDOUT.
                       Optionally specify a control or preset name.
 --import [file.sql] - Import new camera controls and presets found in
                       zm_create.sql into the ZoneMinder dB.
                       Optionally specify an alternate sql file to read from.
 --overwrite         - Overwrite any existing controls or presets.
                       with the same name as the new controls or presets.
 --topreset id       - Copy a monitor to a Camera Preset given the monitor id.
 --noregex           - Do not try to find and replace fields such as usernames,
                       passwords, IP addresses, etc with generic placeholders
                       when converting a monitor to a preset.
 --help              - Print usage information.
 --user=<dbuser>     - Alternate dB user with privileges to alter dB.
 --pass=<dbpass>     - Password of alternate dB user with privileges to alter dB.
 --version           - Print version.
```


zmcontrol.pl

title: zmcontrol.pl(8)

summary: ZoneMinder control script

text:
# zmcontrol.pl(8)

## NAME
zmcontrol.pl - ZoneMinder control script

## SYNOPSIS

```
 zmcontrol.pl --id {monitor_id} [--command={command}] [various options]
 zmcontrol.pl --protocol {module} --address {addr} [--device {dev}] --command {cmd}
```

## DESCRIPTION
ZoneMinder camera control script. Operates in two modes:

Monitor mode (--id): Connects to the control daemon for the given monitor, or starts the daemon if run without --command. Requires a running ZoneMinder instance with database access.

Direct protocol mode (--protocol): Loads a ZoneMinder::Control module directly and executes a single command without requiring database access or a running ZoneMinder instance. Useful for testing control modules.

## OPTIONS

```
 --id [ monitor_id ] - Monitor ID (monitor mode)
 --protocol [ name ] - Control module name, e.g. ONVIF (direct mode)
 --address [ addr ]  - ControlAddress, e.g. user:pass@host:port (direct mode)
 --device [ dev ]    - ControlDevice / profile token (direct mode)
 --command [ cmd ]   - Command to execute (e.g. moveConUp, get_config)
 --autostop          -
 --xcoord [ arg ]    - X-coord
 --ycoord [ arg ]    - Y-coord
 --speed [ arg ]     - Speed
 --step [ arg ]      -
 --panspeed [ arg ]  -
 --panstep [ arg ]   -
 --tiltspeed [ arg ] -
 --tiltstep [ arg ]  -
 --preset [ arg ]    -
```

## EXAMPLES

```
 # Direct protocol testing (no database needed)
 zmcontrol.pl --protocol ONVIF --address admin:pass@192.168.1.100 --command get_config
 # With profile token
 zmcontrol.pl --protocol ONVIF --address admin:pass@cam:8080 --device prof0 --command get_config
 # Send command to running monitor daemon
 zmcontrol.pl --id 1 --command moveConUp
```


zmdc.pl

title: zmdc.pl(8)

summary: ZoneMinder Daemon Control script

text:
# zmdc.pl(8)

## NAME
zmdc.pl - ZoneMinder Daemon Control script

## SYNOPSIS
zmdc.pl {command} [daemon [options]]

## DESCRIPTION
This script is the gateway for controlling the various ZoneMinder daemons. All starting, stopping and restarting goes through here. On the first invocation it starts up a server which subsequently records what's running and what's not. Other invocations just connect to the server and pass instructions to it.

## OPTIONS
{command} - One of 'startup|shutdown|status|check|logrot' or 'start|stop|restart|reload|version'. [daemon [options]] - Daemon name and options, required for second group of commands


zmeventtool.pl

title: zmeventtool.pl(8)

text:
# zmeventtool.pl(8)

## NAME
zmeventtool.pl - ZoneMinder tool to perform various actions on events

## SYNOPSIS

```
 zmeventtool.pl [--user=<dbuser> --pass=<dbpass>] command [list of event ids]
```

## DESCRIPTION
This script performs various actions on an event. It is primarily meant to be run from a filter but could be run manually.

## OPTIONS

```
 close               - Update event record after a crash
 deletejpegs         - Deletes all jpegs from the event directory
 deleteanalysisjpegs - Deletes the analysis jpegs from the event directory
 --help              - Print usage information.
 --user=<dbuser>     - Alternate dB user with privileges to alter dB.
 --pass=<dbpass>     - Password of alternate dB user with privileges to alter dB.
 --version           - Print version.
```


zmfilter.pl

title: zmfilter.pl(8)

text:
# zmfilter.pl(8)

## NAME
zmfilter.pl - ZoneMinder tool to select events and perform actions on them

## SYNOPSIS
zmfilter.pl [-f <filter name>,--filter=<filter name>] [--filter_id=<filter id>] [--daemon] | -v, --version

## DESCRIPTION
This script performs a specified database query to select recorded events and performs specified actions on them such as email reporting, deleting, moving, etc. If the --daemon option is given it will remain resident, repeating the query and applying actions. This is normally managed by zmdc.pl however it can be used manually as well.

## OPTIONS

```
  -f{filter name}, --filter={filter name}  - The name of a specific filter to run
  --filter_id={filter id}                  - The id of a specific filter to run
  --daemon                                 - Causes zmfilter.pl to stay running endlessly repeating the filter(s).
  -v, --version                            - Print ZoneMinder version
```


zmonvif-probe.pl

title: zmonvif-probe.pl(8)

summary: ZoneMinder ONVIF probing tool

text:
# zmonvif-probe.pl(8)

## NAME
zmonvif-probe.pl - ZoneMinder ONVIF probing tool

## SYNOPSIS

```
 zmonfig-probe.pl [-v] probe <soap version>
                  [-v] <command> <device URI> <soap version> <user> <password>\n";
  Commands are:
    probe     - scan for devices on the local network and list them
    profiles  - print the device's supported stream configurations
    metadata  - print some of the device's configuration settings
    move      - move the device (only ptz cameras)
    events    - check if the device supports ONVIF events
    other     - Any command supported by the ONVIF Media element.
  Common parameters:
    -v        - increase verbosity
  Device access parameters (for all commands but 'probe'):
    device URL    - the ONVIF Device service URL
    soap version  - SOAP version (1.1 or 1.2)
    user          - username of a user with access to the device
    password      - password for the user
```

## OPTIONS

```
 -c, --continuous           - Run continuously
 -f, --force                - Run even if pid file exists
 -i, --interactive          - Ask before applying any changes
 -m, --monitor_id           - Only consider the given monitor
 -r, --report               - Just report don't actually do anything
 -s, --storage_id           - Specify a storage area to audit instead of all
 -v, --version              - Print the installed version of ZoneMinder
```


zmonvif-trigger.pl

title: zmonvif-trigger.pl(8)

summary: ZoneMinder ONVIF trigger daemon

text:
# zmonvif-trigger.pl(8)

## NAME
zmonvif-trigger.pl - ZoneMinder ONVIF trigger daemon

## SYNOPSIS

```
 zmonfig-trigger.pl [-v] [-s] [-l=]
```

## OPTIONS

```
    local-addr    - local address to bind to
    script|s=s   - script to run
    verbose|v=s  - increase verbosity
```


zmpkg.pl

title: zmpkg.pl(8)

summary: ZoneMinder Package Control Script

text:
# zmpkg.pl(8)

## NAME
zmpkg.pl - ZoneMinder Package Control Script

## SYNOPSIS
zmpkg.pl {start|stop|restart|status|logrot|state|version}

## DESCRIPTION

```
  This script is used to start and stop the ZoneMinder package primarily to
allow command line control for automatic restart on reboot (see zm script)
```


zmrecover.pl

title: zmrecover.pl(8)

text:
# zmrecover.pl(8)

## NAME
zmrecover.pl - ZoneMinder event file system and database recovery checker

## SYNOPSIS

```
 zmrecover.pl [-r,-report|-i,-interactive]
```

## DESCRIPTION
This script checks for consistency between the event filesystem and the database. If events are found in one and not the other they are deleted (optionally). Additionally any monitor event directories that do not correspond to a database monitor are similarly disposed of. However monitors in the database that don't have a directory are left alone as this is valid if they are newly created and have no events yet.

## OPTIONS

```
 -i, --interactive          - Ask before applying any changes
 -m, --monitor_id           - Only consider the given monitor
 -r, --report               - Just report don't actually do anything
 -s, --storage_id           - Specify a storage area to recover instead of all
 -v, --version              - Print the installed version of ZoneMinder
```

## COPYRIGHT
ZoneMinder Recover Script Copyright (C) 2018 ZoneMinder LLC

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


zmstats.pl

title: zmstats.pl(8)

summary: ZoneMinder Stats Updating Script

text:
# zmstats.pl(8)

## NAME
zmstats.pl - ZoneMinder Stats Updating Script

## SYNOPSIS
zmstats.pl

## DESCRIPTION
This does background updating various stats in the db like event counts, diskspace, etc.


zmsystemctl.pl

title: zmsystemctl.pl(8)

summary: ZoneMinder systemctl wrapper

text:
# zmsystemctl.pl(8)

## NAME
zmsystemctl.pl - ZoneMinder systemctl wrapper

## SYNOPSIS

```
 zmsystemctl.pl {start|stop|restart|version}
```

## DESCRIPTION
This script allows an unpriveledged user to start, stop, or restart the zoneminder service on a system running systemd. It does this by redirecting commands through pkexec, which checks the available polkit policy files. The default policy file grants the system web account user permission. This can be changed or expanded by modifying the policy file. See man polkit for details.

## SEE ALSO
polkit(8), pkexec(1)


zmtelemetry.pl

title: zmtelemetry.pl(8)

text:
# zmtelemetry.pl(8)

## NAME
zmtelemetry.pl - Send usage information to the ZoneMinder development team

## SYNOPSIS

```
 zmtelemetry.pl [--force] [--help] [--show] [--interval=seconds] [--version]
```

## DESCRIPTION
This script collects usage information of the local system and sends it to the ZoneMinder development team. This data will be used to determine things like who and where our customers are, how big their systems are, the underlying hardware and operating system, etc. This is being done for the sole purpoase of creating a better product for our target audience. This script is intended to be completely transparent to the end user, and can be disabled from the web console under Options.

## OPTIONS

```
 --force        Force the script to upload it's data instead of waiting
                for the defined interval since last upload.
 --help         Display usage information
 --show         Displays telemetry data that is sent to zoneminder
 --interval     Override the default configured interval since last upload.
                The value should be given in seconds, but can be an expression
                such as 24*60*60.
 --version      Output the version of ZoneMinder.
```


zmtrack.pl

title: zmtrack.pl(8)

text:
# zmtrack.pl(8)

## NAME
zmtrack.pl - ZoneMinder Experimental PTZ Tracking Script

## SYNOPSIS

```
 zmtrack.pl -m <monitor>
 zmtrack.pl --monitor=<monitor>
```

## OPTIONS

```
 -m<monitor>, --monitor=<monitor>   - Id of the monitor to track
```

## DESCRIPTION
This script is used to trigger and cancel alarms from external sources using an arbitrary text based format.


zmtrigger.pl

title: zmtrigger.pl(8)

summary: ZoneMinder External Trigger Script

text:
# zmtrigger.pl(8)

## NAME
zmtrigger.pl - ZoneMinder External Trigger Script

## DESCRIPTION
This script is used to trigger and cancel alarms from external connections using an arbitrary text based format.

This script offers generic solution to external triggering of alarms. It can handle external connections via either internet socket, unix socket or file/device interfaces. You can either use it 'as is' if you can interface with the existing format, or override connections and channels to customise it to your needs.

If enabled by the OPT_TRIGGERS option, Zoneminder service start zmtrigger.pl which listens for control messages on TCP port 6802.

## TRIGGER MESSAGE FORMAT
id|action|score|cause|text|showtext

id

```
  is the id number or name of the ZM monitor.

```

action

```
  Valid actions are 'on', 'off', 'cancel' or 'show' where
  'on' forces an alarm condition on;
  'off' forces an alarm condition off;
  'cancel' negates the previous 'on' or 'off';
  'show' updates the auxiliary text represented by the %Q
  placeholder, which can optionally be added to the affected monitor's
  timestamp label format.

  Ordinarily you would use 'on' and 'cancel', 'off' would tend to be
  used to suppress motion based events. Additionally 'on' and 'off' can
  take an additional time offset, e.g. on+20 which automatically
  cancel's the previous action after that number of seconds.

```

score

```
  is the score given to the alarm, usually to indicate it's
  importance. For 'on' triggers it should be non-zero, otherwise it should
  be zero.

```

cause

```
  is a 32 char max string indicating the reason for, or source of
  the alarm e.g. 'Relay 1 open'. This is saved in the 'Cause' field of the
  event. Ignored for 'off' or 'cancel' messages.

```

text

```
  is a 256 char max additional info field, which is saved in the
  'Description' field of an event. Ignored for 'off' or 'cancel' messages.

```

showtext

```
  is up to 32 characters of text that can be displayed in the
  timestamp that is added to images. The 'show' action is designed to
  update this text without affecting alarms but the text is updated, if
  present, for any of the actions. This is designed to allow external input
  to appear on the images captured, for instance temperature or personnel
  identity etc.

```

```
  Note that multiple messages can be sent at once and should be LF or CRLF
  delimited. This script is not necessarily intended to be a solution in
  itself, but is intended to be used as 'glue' to help ZoneMinder interface
  with other systems. It will almost certainly require some customisation
  before you can make any use of it. If all you want to do is generate alarms
  from external sources then using the ZoneMinder::SharedMem perl module is
  likely to be easier.
```

## EXAMPLES

```
  3|on+10|1|motion|text|showtext
```

Triggers 'alarm' on camera #3 for 10 seconds with score=1, cause='motion'.


zmu

title: zmu(8)

summary: The ZoneMinder Utility

text:
# zmu(8)

## NAME
zmc - The ZoneMinder Utility

## SYNOPSIS

```
 zmu -d device_path [-v] [function] [-U<username> -P<password>]
 zmu --device device_path [-v] [function] [-U<username> -P<password>]
 zmu -m monitor_id [-v] [function] [-U<username> -P<password>]
 zmu --monitor monitor_id [-v] [function] [-U<username> -P<password>]
```

## DESCRIPTION
This binary is a handy command line interface to several useful functions. It's not really meant to be used by anyone except the web page (there's only limited 'help' in it so far) but can be if necessary, especially for debugging video problems.

## OPTIONS
General options:

-v, --verbose - Produce more verbose output

-l, --list - List the current status of active (or all with -v) monitors

-h, --help - Display usage information

-v, --version - Print the installed version of ZoneMinder

Options for use with devices:

-d, --device [device_path] - Get the current video device settings for [device_path] or all devices

-V, --version <V4L version> - Set the Video 4 Linux API version to use for the query, use 1 or 2

-q, --query - Query the current settings for the device

Options for use with monitors:

-m, --monitor <monitor_id> - Specify which monitor to address, default 1 if absent

-q, --query - Query the current settings for the monitor

-s, --state - Output the current monitor state, 0 = unknown, 1 = idle, 2 = prealarm,

3 = alarm, 4 = alert, 5 = tape

-B, --brightness [value] - Output the current brightness, set to value if given

-C, --contrast [value] - Output the current contrast, set to value if given

-H, --hue [value] - Output the current hue, set to value if given

-O, --colour [value] - Output the current colour, set to value if given

-i, --image [image_index] - Write captured image to disk as <monitor_name>.jpg, last image captured

or specified ring buffer index if given.

-S, --scale <scale_%%ge> - With --image specify any scaling (in %%) to be applied to the image

-t, --timestamp [image_index] - Output captured image timestamp, last image captured or specified

ring buffer index if given

-R, --read_index - Output ring buffer read index

-W, --write_index - Output ring buffer write index

-e, --event - Output last event index

-f, --fps - Output last Frames Per Second captured reading

-z, --zones - Write last captured image overlaid with zones to <monitor_name>-Zones.jpg

-a, --alarm - Force alarm in monitor, this will trigger recording until cancelled with -c

-n, --noalarm - Force no alarms in monitor, this will prevent alarms until cancelled with -c

-c, --cancel - Cancel a forced alarm/noalarm in monitor, required after being enabled with -a or -n

-L, --reload - Signal monitor to reload settings

-E, --enable - Enable detection, wake monitor up

-D, --disable - Disable detection, put monitor to sleep

-u, --suspend - Suspend detection, useful to prevent bogus alarms when panning etc

-r, --resume - Resume detection after a suspend

-U, --username <username> - When running in authenticated mode the username and

-P, --password <password> - password combination of the given user

-A, --auth <authentication> - Pass authentication hash string instead of user details

-x, --xtrigger - Output the current monitor trigger state, 0 = not triggered, 1 = triggered


zmupdate.pl

title: zmupdate.pl(8)

summary: check and upgrade ZoneMinder database

text:
# zmupdate.pl(8)

## NAME
zmupdate.pl - check and upgrade ZoneMinder database

## SYNOPSIS
zmupdate.pl -c,--check | -f,--freshen | -v<version>,--version=<version> [-u <dbuser> -p <dbpass>]

## DESCRIPTION
This script checks what the most recent release of ZoneMinder is at the the moment by downloading https://update.zoneminder.com/version.txt. It can also apply and configure upgrades etc, including on the fly upgrades.

## OPTIONS

```
 -c, --check                       - Check for updated versions of ZoneMinder.
                                     If not interactive zmupdate.pl will stay running, checking every hour.
                                     If interactive will try once, print out result and quit.
 -f, --freshen                     - Freshen the configuration in the database. Equivalent of old zmconfig.pl -noi
 --migrate-events                  - Update database structures as per USE_DEEP_STORAGE setting.
 -v <version>, --version=<version> - Force upgrade to the current version from <version>
 -u <dbuser>, --user=<dbuser>      - Alternate DB user with privileges to alter DB
 -p <dbpass>, --pass=<dbpass>      - Password of alternate DB user with privileges to alter DB
 -s, --super                       - Use system maintenance account on debian based systems instead of unprivileged account
 -d <dir>, --dir=<dir>             - Directory containing update files if not in default build location
 -interactive                      - interact with the user
 -nointeractive                    - do not interact with the user
```


zmvideo.pl

title: zmvideo.pl(8)

summary: ZoneMinder Video Creation Script

text:
# zmvideo.pl(8)

## NAME
zmvideo.pl - ZoneMinder Video Creation Script

## SYNOPSIS

```
 zmvideo.pl [ -e <event_id>,--event=<event_id> | --filter_name=<filter name> | --filter_id=<filter id> ]
            [--concat=filename]
            [--format <format>]
            [--rate=<rate>]
            [--scale=<scale>]
            [--fps=<fps>]
            [--size=<size>]
            [--overwrite]
```

## DESCRIPTION
This script is used to create MPEG videos of events for the web pages or as email attachments.


zmwatch.pl

title: zmwatch.pl(8)

summary: ZoneMinder WatchDog Script

text:
# zmwatch.pl(8)

## NAME
zmwatch.pl - ZoneMinder WatchDog Script

## SYNOPSIS
zmwatch.pl

## DESCRIPTION
This does some basic setup for ZoneMinder to run and then periodically checks the fps output of the active daemons to check they haven't locked up. If they have then they are killed and restarted


title: zmx10.pl(8)

summary: ZoneMinder X10 Control Script

text:
# zmx10.pl(8)

## NAME
zmx10.pl - ZoneMinder X10 Control Script

## SYNOPSIS

```
 zmx10.pl -c <command>,--command=<command> [-u <unit code>,--unit-code=<unit code>]
```

## DESCRIPTION
This script controls the monitoring of the X10 interface and the consequent management of the ZM daemons based on the receipt of X10 signals.

## OPTIONS

```
 -c <command>, --command=<command>       - Command to issue, one of 'on','off','dim','bright','start', 'status','shutdown'
 -u <unit code>, --unit-code=<unit code> - Unit code to act on required for all commands
                                           except 'status' (optional) and 'shutdown'
 -v, --verison                           - Pirnts the currently installed version of ZoneMinder
```


zram-generator

package: zram-generator

title: zram-generator(8)

text:
# zram-generator(8)

## NAME
zram-generator - Systemd unit generator for zram swap devices

## SYNOPSIS
/usr/lib/systemd/system-generators/zram-generator TARGET_DIR [2RGET_DIR 3RGET_DIR]

/usr/lib/systemd/system-generators/zram-generator --setup-device DEVICE

/usr/lib/systemd/system-generators/zram-generator --reset-device DEVICE

## DESCRIPTION
zram-generator is a generator that creates systemd units to format and use compressed RAM devices, either as swap or a file system.

The generator will be invoked by systemd early at boot. The generator will then:

1.

read configuration files from {/etc,/lib}/systemd/zram-generator.conf[.d] (see zram-generator.conf(5) for details);

2.

generate systemd.swap(5) and/or systemd.mount(5) units into TARGET_DIR and connect them to swap.target or local-fs.target as appropriate;

3.

ensure the zram module is loaded and create the requested devices.

The generator does nothing if run inside a container (as determined by systemd-detect-virt(8) --container).

The generator also understands the kernel command-line option systemd.zram. See zram-generator.conf(5) for details.

Setting the ZRAM_GENERATOR_ROOT environment variable makes the generator run in test mode, in which case containerisation is ignored and step 3 is skipped.

For the ramifications of ZRAM_GENERATOR_ROOT on config handling, see zram-generator.conf(5).

Generated dev-zramN.swap units depend on systemd-zram-setup@zramN.service, which will:

1.

read configuration files from {/etc,/lib}/systemd/zram-generator.conf[.d] (see zram-generator.conf(5) for details);

2.

set the desired compression algorithm, if any; if the current kernel doesn´t understand the specified algorithm, a warning is issued, but execution continues;

3.

set the desired blockdev size and format it as swap with systemd-makefs(8).

Generated path-to-mount-point.mount units depend on systemd-zram-setup@zramN.service. The effect is similar to what happens for swap units, but of course they are formatted with a file system.

When the unit is stopped, the zram device is reset, freeing memory and allowing the device to be reused.

zram-generator implements systemd.generator(7).

### Applying config changes
This generator is invoked in early boot, and the devices it configures will be created very early too, so the easiest way to apply config changes is to simply reboot the machine.

Nevertheless, sometimes it may be useful to add new devices or apply config changes at runtime. Applying new configuration means restarting the units, and that in turn means recreating the zram devices. This means that file systems are temporarily unmounted and their contents lost, and pages are moved out of the compressed swap device into other memory. If this is acceptable, systemctl restart systemd-zram-setup@zramN or systemctl restart systemd-zram-setup@* may be used to recreate a specific device or all configured devices. (If the device didn´t exist, restart will create it.) If the way the device is used (e.g. the mount point or file system type) is changed, systemctl daemon-reload needs to be called first to recreate systemd units. If a device or mount point is removed from configuration, the unit should be stopped before calling daemon-reload. Otherwise, systemd will not know how to stop the unit properly.

## REPORTING BUGS
https://github.com/systemd/zram-generator/issues

## SEE ALSO
zram-generator.conf(5), systemd.generator(7), systemd.swap(5)

https://github.com/systemd/zram-generator

Linux documentation of zram: https://kernel.org/doc/html/latest/admin-guide/blockdev/zram.html

and the zram sysfs ABI: https://kernel.org/doc/Documentation/ABI/testing/sysfs-block-zram