Send Motion-user mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Re: gcc compiler flag to enable all-cores stream processing?
      (tosiara)
   2. Re: gcc compiler flag to enable all-cores stream processing?
      (rmbusy)
   3. Re: Second threshold at same camera (Ruslan Matveev)


----------------------------------------------------------------------

Message: 1
Date: Sun, 27 Oct 2019 20:19:49 +0200
From: tosiara <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] gcc compiler flag to enable all-cores
        stream processing?
Message-ID:
        <CACHTdwS+3d8QYimV=9gdf4qewg734-mpgvwiotw+qn_xcef...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Please provide the links to the odroid forum discussion

You can also try to compile the following test:

https://gist.github.com/tosiara/3c9739744b6dd17d8f1ea3c0d99d8b9d
gcc threads.c -o threads -lpthread

Run it as:

./threads 8

Does it cause shutdown?

On Sun, Oct 27, 2019 at 7:50 PM Tony <[email protected]> wrote:
>
> On 10/27/19 10:41 AM, tosiara wrote:
> > You don't need any flags, and there are no any flag that control
> > number of threads being used. You should be fine running 2, 3 and more
> > cameras depending on resolution and fps.
> > What is your issue? If it is "XU4 suffers shutdown" - then motion does
> > not control directly any shutdown process, check your hardware and OS
>
> I have checked hardware and OS thoroughly in the Odroid user groups
> before asking here, and everything works properly until motion is
> running at 300+% CPU.
> > On Sun, Oct 27, 2019 at 6:24 PM I wrote:
> >> I've compiled motion 4.2.2 on an Odroid XU4 monitoring 2 IP cameras at 15 
> >> fps, and find the CPUs to be overloaded with "top" reporting?? ~300%, 
> >> After about 1/2 day of this, the XU4 suffers shutdown:
> >>
> >> Tasks: 128 total,   1 running, 127 sleeping,   0 stopped,   0 zombie
> >> %Cpu0  :100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu1  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu2  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu3  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu4  : 88.9 us, 11.1 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu5  : 56.2 us,  0.0 sy,  0.0 ni, 43.8 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu6  : 64.7 us,  0.0 sy,  0.0 ni, 35.3 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> %Cpu7  :  0.0 us,  6.2 sy,  0.0 ni, 93.8 id,  0.0 wa,  0.0 hi,  0.0 si,  
> >> 0.0 st
> >> MiB Mem :   1996.9 total,   1111.6 free,    343.6 used,    541.7 buff/cache
> >> MiB Swap:    998.4 total,    998.4 free,      0.0 used.   1590.6 avail Mem
> >>
> >>    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ 
> >> COMMAND
> >>    988 tross     20   0  489868 265712   6916 S 306.2  13.0 165:21.87 
> >> motion
> >>   2996 root      20   0    4660   2032   1676 R   6.2   0.1   0:00.03 top
> >>      1 root      20   0   31036   6736   5216 S   0.0   0.3   0:04.70 
> >> systemd
> >> ...
> >>
> >> It occurs to me that the XU4's Samsung Exynos5422 Cortex-A15 2Ghz and 
> >> Cortex-A7 Octa core CPUs should be able to handle 2 IP cameras, so I'm 
> >> wondering please if there are any CFLAGS that can be passed to gcc 8.3.0 
> >> to make better use of the available processors. I don't have the 
> >> programming knowledge necessary to make changes to the C code, but can 
> >> apply a diff file if someone has one.
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user



------------------------------

Message: 2
Date: Sun, 27 Oct 2019 11:23:24 -0700
From: rmbusy <[email protected]>
To: [email protected]
Subject: Re: [Motion-user] gcc compiler flag to enable all-cores
        stream processing?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

I'm running 8 cameras (3 streaming RTSP @ 5 frames/sec, 3 snapshot at 
5/sec) on a Rock64 4GB (quad core ARM 1.3GHZ).? I initially had issues 
with CPU usage when running 4.2.2, but eventually brought it in line 
with the usage I saw running 4.1.1. However, due to the new web server 
in 4.2.2 not being browser friendly with more than 6 cameras, I 
abandoned it, and went back to 4.1.1.

I'm currently seeing usage numbers between 140% and 170%, until I 
connect to the camera web page.

top - 11:17:58 up 83 days, 23:38,? 2 users,? load average: 3.22, 1.86, 1.83
Tasks: 151 total,?? 1 running, 150 sleeping,?? 0 stopped,?? 0 zombie
%Cpu(s): 36.2 us,? 0.5 sy,? 0.0 ni, 61.9 id,? 0.7 wa,? 0.0 hi, 0.7 si,? 
0.0 st
KiB Mem :? 4081984 total,? 3193864 free,?? 562348 used,?? 325772 buff/cache
KiB Swap:??????? 0 total,??????? 0 free,??????? 0 used.? 3442980 avail Mem

 ? PID USER????? PR? NI??? VIRT??? RES??? SHR S? %CPU %MEM TIME+ COMMAND
 ?8136 motion??? 20?? 0 1491716 494276?? 6976 S 147.0 12.1 112508:13 motion
11923 root????? 20?? 0??? 8204?? 3336?? 2604 R?? 1.0? 0.1 0:00.70 top
 ?7036 root????? 20?? 0?? 11876?? 6068?? 5124 S?? 0.3? 0.1 0:00.23 sshd
 ??? 1 root????? 20?? 0?? 92264?? 5528?? 3760 S?? 0.0? 0.1 4:15.48 systemd

If I connect to the camera web page, the usage goes up, and the CPU 
maxes out at 400%.

top - 11:19:20 up 83 days, 23:39,? 2 users,? load average: 4.97, 2.58, 2.08
Tasks: 151 total,?? 1 running, 150 sleeping,?? 0 stopped,?? 0 zombie
%Cpu(s): 93.5 us,? 1.7 sy,? 0.0 ni,? 0.0 id,? 0.0 wa,? 0.0 hi, 4.8 si,? 
0.0 st
KiB Mem :? 4081984 total,? 3192316 free,?? 563776 used,?? 325892 buff/cache
KiB Swap:??????? 0 total,??????? 0 free,??????? 0 used.? 3441556 avail Mem

 ? PID USER????? PR? NI??? VIRT??? RES??? SHR S? %CPU %MEM TIME+ COMMAND
 ?8136 motion??? 20?? 0 1491716 494276?? 6976 S 394.8 12.1 112511:06 motion
 ?? 13 root????? 20?? 0?????? 0????? 0????? 0 S?? 2.3? 0.0 15:03.56 
ksoftirqd/1
11923 root????? 20?? 0??? 8204?? 3336?? 2604 R?? 1.0? 0.1 0:01.43 top
 ??? 7 root????? 20?? 0?????? 0????? 0????? 0 S?? 0.3? 0.0 123:47.11 
rcu_sched
 ?7036 root????? 20?? 0?? 11876?? 6068?? 5124 S?? 0.3? 0.1 0:00.27 sshd

Check your CPU usage without anything connecting to the camera web 
page.? If it's still high, then it must be a Motion configuration issue.


--
Rob.


On 10/27/19 10:50 AM, Tony wrote:
> On 10/27/19 10:41 AM, tosiara wrote:
>> You don't need any flags, and there are no any flag that control
>> number of threads being used. You should be fine running 2, 3 and more
>> cameras depending on resolution and fps.
>> What is your issue? If it is "XU4 suffers shutdown" - then motion does
>> not control directly any shutdown process, check your hardware and OS
> I have checked hardware and OS thoroughly in the Odroid user groups
> before asking here, and everything works properly until motion is
> running at 300+% CPU.
>> On Sun, Oct 27, 2019 at 6:24 PM I wrote:
>>> I've compiled motion 4.2.2 on an Odroid XU4 monitoring 2 IP cameras at 15 
>>> fps, and find the CPUs to be overloaded with "top" reporting?? ~300%, After 
>>> about 1/2 day of this, the XU4 suffers shutdown:
>>>
>>> Tasks: 128 total,   1 running, 127 sleeping,   0 stopped,   0 zombie
>>> %Cpu0  :100.0 us,  0.0 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu1  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu2  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu3  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu4  : 88.9 us, 11.1 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu5  : 56.2 us,  0.0 sy,  0.0 ni, 43.8 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu6  : 64.7 us,  0.0 sy,  0.0 ni, 35.3 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> %Cpu7  :  0.0 us,  6.2 sy,  0.0 ni, 93.8 id,  0.0 wa,  0.0 hi,  0.0 si,  
>>> 0.0 st
>>> MiB Mem :   1996.9 total,   1111.6 free,    343.6 used,    541.7 buff/cache
>>> MiB Swap:    998.4 total,    998.4 free,      0.0 used.   1590.6 avail Mem
>>>
>>>     PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ 
>>> COMMAND
>>>     988 tross     20   0  489868 265712   6916 S 306.2  13.0 165:21.87 
>>> motion
>>>    2996 root      20   0    4660   2032   1676 R   6.2   0.1   0:00.03 top
>>>       1 root      20   0   31036   6736   5216 S   0.0   0.3   0:04.70 
>>> systemd
>>> ...
>>>
>>> It occurs to me that the XU4's Samsung Exynos5422 Cortex-A15 2Ghz and 
>>> Cortex-A7 Octa core CPUs should be able to handle 2 IP cameras, so I'm 
>>> wondering please if there are any CFLAGS that can be passed to gcc 8.3.0 to 
>>> make better use of the available processors. I don't have the programming 
>>> knowledge necessary to make changes to the C code, but can apply a diff 
>>> file if someone has one.
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user




------------------------------

Message: 3
Date: Mon, 28 Oct 2019 10:37:56 +0300
From: Ruslan Matveev <[email protected]>
To: Motion discussion list <[email protected]>
Subject: Re: [Motion-user] Second threshold at same camera
Message-ID:
        <cabqvc7siabhqu5dsvaszabfppjfm0ay0enj9f656ch2d-oq...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

This might be a little bit late, but check out this one:
http://myplace.frontier.com/~r.bond/cats/cats.htm
Looks like this guy has successfully solved similar problem.

On Sun, Oct 27, 2019 at 6:44 PM Tony Ross via Motion-user <
[email protected]> wrote:

> Why not a camera2.conf file monitoring the same camera stream with
> different parameters.
>
> On 10/25/19 3:13 AM, walexand wrote:
> > I am using motion 4.2.2 on a Raspberry Pi.
> >
> > Is it possible, to define a second threshold level at the same camera
> > and trigger an external program, when second threshold is reached?
> > For example, first threshold level at 5% percent changing pixels and
> > second theshold at 40%?
> >
> > I want to detect the neighbours cat and start picture capturing when its
> > entering my cat ladder. When its up the ladder to a certain height, I
> > want to open a magnetic valve to spray him with water.
> >
> > Believe me, I love cats and I dont want to hurt any. Even the bad
> > neighbours cat. He is a beautiful male cat, but he really harasses my
> > cat.
> >
> > So, any chance to trigger an external script on a higher threshold level?
> >
> > Thanks in Advance
> > Regards
> > Alex
> >
> >
> > _______________________________________________
> > Motion-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/motion-user
> > https://motion-project.github.io/
> >
> > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
> >
>
>
>
> _______________________________________________
> Motion-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/motion-user
> https://motion-project.github.io/
>
> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 160, Issue 20
********************************************

Reply via email to