TYVM for the sanity inducing reply. Face palm, now having found the Source type things are getting there, though I have other issues now, the docs for those wondering in that I have found are here:
https://wiki.zoneminder.com/index.php/H ... ly_support
of note, it is failing for me with errors in the log such as:
Code: Select all
2020-01-08 13:06:11.400900 zmdc 30217 ERR 'zma -m 1' exited abnormally, exit status 255 zmdc.pl
2020-01-08 13:06:11.353021 zma_m1 21669 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-01-08 13:06:11.274770 zmdc 21669 INF 'zma -m 1' started at 20/01/08 19:06:11 zmdc.pl
2020-01-08 13:06:11.274770 zmdc 30217 INF 'zma -m 1' starting at 20/01/08 19:06:11, pid = 21669 zmdc.pl
2020-01-08 13:06:11.218550 zmdc 30217 INF 'zmc -m 1' exited normally zmdc.pl
2020-01-08 13:06:11.180834 zmc_m1 21012 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2020-01-08 13:06:11.148270 zmdc 30217 INF 'zmc -m 1' sending stop to pid 21012 at 20/01/08 19:06:11 zmdc.pl
2020-01-08 13:06:11.074610 zmdc 30217 INF 'zma -m 1' exited, signal 14 zmdc.pl
2020-01-08 13:06:11.042150 zmdc 30217 INF 'zma -m 1' sending stop to pid 21475 at 20/01/08 19:06:11 zmdc.pl
2020-01-08 13:06:10.940980 zmwatch 30409 INF Restarting capture daemon for Monitor-1, no image since startup. Startup time was 1578510360 - now 1578510370 > 5 zmwatch.pl
2020-01-08 13:06:08.034020 zmdc 21475 INF 'zma -m 1' started at 20/01/08 19:06:08 zmdc.pl
2020-01-08 13:06:08.033490 zmdc 30217 INF 'zma -m 1' starting at 20/01/08 19:06:08, pid = 21475 zmdc.pl
2020-01-08 13:06:07.870620 zmdc 30217 INF Starting pending process, zma -m 1 zmdc.pl
2020-01-08 13:06:02.223960 zmfilter_2 30373 INF Checking filter Update DiskSpace update disk space returned 0 events zmfilter.pl
2020-01-08 13:06:00.858821 zmc_m1 21012 INF Starting Capture version 1.32.3 zmc.cpp 223
2020-01-08 13:06:00.748510 zmdc 30217 INF 'zmc -m 1' starting at 20/01/08 19:06:00, pid = 21012 zmdc.pl
2020-01-08 13:06:00.748380 zmdc 21012 INF 'zmc -m 1' started at 20/01/08 19:06:00 zmdc.pl
2020-01-08 13:06:00.708160 zmdc 30217 INF Starting pending process, zmc -m 1 zmdc.pl
2020-01-08 13:05:57.673090 zmdc 30217 ERR 'zma -m 1' exited abnormally, exit status 255 zmdc.pl
2020-01-08 13:05:57.640839 zma_m1 20765 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-01-08 13:05:57.522580 zmdc 20765 INF 'zma -m 1' started at 20/01/08 19:05:57 zmdc.pl
2020-01-08 13:05:57.522570 zmdc 30217 INF 'zma -m 1' starting at 20/01/08 19:05:57, pid = 20765 zmdc.pl
2020-01-08 13:05:57.343320 zmdc 30217 INF Starting pending process, zma -m 1 zmdc.pl
2020-01-08 13:05:55.367110 zmfilter_1 30342 INF Checking filter PurgeWhenFull delete returned 0 events zmfilter.pl
2020-01-08 13:05:52.306170 zmdc 30217 ERR 'zma -m 1' exited abnormally, exit status 255 zmdc.pl
2020-01-08 13:05:52.198652 zma_m1 20430 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-01-08 13:05:52.121290 zmdc 20430 INF 'zma -m 1' started at 20/01/08 19:05:52 zmdc.pl
2020-01-08 13:05:52.121280 zmdc 30217 INF 'zma -m 1' starting at 20/01/08 19:05:52, pid = 20430 zmdc.pl
2020-01-08 13:05:52.029750 zmdc 30217 INF Starting pending process, zma -m 1 zmdc.pl
2020-01-08 13:05:50.997100 zmdc 30217 ERR 'zma -m 1' exited abnormally, exit status 255 zmdc.pl
2020-01-08 13:05:50.932288 zma_m1 20403 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-01-08 13:05:50.855220 zmdc 30217 INF 'zma -m 1' starting at 20/01/08 19:05:50, pid = 20403 zmdc.pl
2020-01-08 13:05:50.855220 zmdc 20403 INF 'zma -m 1' started at 20/01/08 19:05:50 zmdc.pl
2020-01-08 13:05:50.807910 zmdc 30217 INF 'zmc -m 1' exited normally zmdc.pl
2020-01-08 13:05:50.719792 zmc_m1 19378 INF Got signal 15 (Terminated), exiting zm_signal.cpp 40
2020-01-08 13:05:50.695090 zmdc 30217 INF 'zmc -m 1' sending stop to pid 19378 at 20/01/08 19:05:50 zmdc.pl
2020-01-08 13:05:50.620990 zmdc 30217 INF 'zma -m 1' exited, signal 14 zmdc.pl
2020-01-08 13:05:50.583700 zmdc 30217 INF 'zma -m 1' sending stop to pid 19455 at 20/01/08 19:05:50 zmdc.pl
2020-01-08 13:05:50.478950 zmwatch 30409 INF Restarting capture daemon for Monitor-1, no image since startup. Startup time was 1578510335 - now 1578510350 > 5 zmwatch.pl
2020-01-08 13:05:36.596040 zmdc 19455 INF 'zma -m 1' started at 20/01/08 19:05:36 zmdc.pl
2020-01-08 13:05:36.596030 zmdc 30217 INF 'zma -m 1' starting at 20/01/08 19:05:36, pid = 19455 zmdc.pl
2020-01-08 13:05:36.561730 zmdc 30217 INF Starting pending process, zma -m 1 zmdc.pl
2020-01-08 13:05:35.647981 zmc_m1 19378 INF Starting Capture version 1.32.3 zmc.cpp 223
2020-01-08 13:05:35.520190 zmdc 30217 INF 'zmc -m 1' starting at 20/01/08 19:05:35, pid = 19378 zmdc.pl
2020-01-08 13:05:35.520190 zmdc 19378 INF 'zmc -m 1' started at 20/01/08 19:05:35 zmdc.pl
2020-01-08 13:05:35.462290 zmdc 30217 INF Starting pending process, zmc -m 1 zmdc.pl
2020-01-08 13:05:31.887240 zmdc 30217 ERR 'zma -m 1' exited abnormally, exit status 255 zmdc.pl
2020-01-08 13:05:31.855363 zma_m1 19116 ERR Got empty memory map file size 0, is the zmc process for this monitor running? zm_monitor.cpp 538
2020-01-08 13:05:31.736870 zmdc 19116 INF 'zma -m 1' started at 20/01/08 19:05:31 zmdc.pl
it is of note that I got around the issue of having multiple files and used inotfiywatch:
Code: Select all
#!/bin/bash
: ${WATCHER_DEBUG:=false}
WATCH_DIR=$1
echo "Watching $WATCH_DIR on $(hostname)"
inotifywait -m $WATCH_DIR -e close_write -e moved_to |
while read path action file; do
echo "The file '$file' appeared in directory '$path' via '$action'"
FILE_TYPE=$( file -b $path$file|cut -f1 -d, )
this_uuid=$(uuidgen -r)
if [[ $FILE_TYPE == "JPEG image data" ]]; then
chown www-data. $path$file /storage/zmwatch/camera1-sputnik.jpg
chmod 775 $path$file /storage/zmwatch/camera1-sputnik.jpg
ln -f $path$file /storage/zmwatch/camera1-sputnik.jpg
else
echo -n "file type was '$FILE_TYPE', "
echo -n "$file Not JPEG, "
if [[ $WATCHER_DEBUG == true ]]; then
echo "retaining in tmp for further inspection. "
else
echo -n "throwing away. "
rm -v $path$file
fi
fi
done
the file is a jpeg:
Code: Select all
file /storage/zmwatch/camera1-sputnik.jpg
/storage/zmwatch/camera1-sputnik.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, Exif Standard: [TIFF image data, big-endian, direntries=3, datetime=2020:01:08 03:33:00], baseline, precision 8, 640x352, frames 3
and it is owned by www-data:
Code: Select all
ls -alh /storage/zmwatch/camera1-sputnik.jpg
-rwxrwxr-x 2 www-data www-data 30K Jan 8 19:13 /storage/zmwatch/camera1-sputnik.jpg