Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Computers are not intelligent. They only think they are.


computers / alt.os.linux.mageia / Strange systemd timer behaviour

SubjectAuthor
* Strange systemd timer behaviourGrimble
`* Re: Strange systemd timer behaviourDavid W. Hodgins
 `* Re: Strange systemd timer behaviourBit Twister
  `* Re: Strange systemd timer behaviourDavid W. Hodgins
   `- Re: Strange systemd timer behaviourGrimble

1
Strange systemd timer behaviour

<td56lc$2fhpr$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5061&group=alt.os.linux.mageia#5061

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: grim...@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Strange systemd timer behaviour
Date: Fri, 12 Aug 2022 10:31:30 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <td56lc$2fhpr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 12 Aug 2022 09:31:24 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="4d5210af7f2aacda04e3a1b109cb1e7f";
logging-data="2606907"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ONQOYyDvKCGZtsnRqoJnR"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Cancel-Lock: sha1:N2Fhp0KziqqAusdPLtnOBx6XA98=
Content-Language: en-GB
 by: Grimble - Fri, 12 Aug 2022 09:31 UTC

I was interested to see if I could launch a small program at one-second
intervals, so I wrote a small python script to write a two variable row
to a database (timestamp, 10 character string). Not wanting to create
the X.service/X.timer entries in /etc/systemd/, I set up a transient
systemd timer as follows:
systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
/home/graeme/Software/Python/write1.py
expecting the '*:*:1' string to be interpreted as every second.
However results were very strange:
2022-08-11 15:00:01.04493 | abcdefghij
2022-08-11 15:00:01.04534 | abcdefghij
2022-08-11 15:00:01.045509 | abcdefghij
2022-08-11 15:00:01.046762 | abcdefghij
2022-08-11 15:00:01.047677 | abcdefghij
2022-08-11 15:00:10.040712 | abcdefghij
2022-08-11 15:01:01.044398 | abcdefghij
2022-08-11 15:01:01.044442 | abcdefghij
2022-08-11 15:01:01.045927 | abcdefghij
2022-08-11 15:01:01.045973 | abcdefghij
2022-08-11 15:01:01.046043 | abcdefghij
2022-08-11 15:01:10.041792 | abcdefghij
2022-08-11 15:02:01.045485 | abcdefghij
2022-08-11 15:02:01.045624 | abcdefghij
2022-08-11 15:02:01.045988 | abcdefghij
2022-08-11 15:02:01.047145 | abcdefghij
2022-08-11 15:02:01.048968 | abcdefghij
2022-08-11 15:02:10.042064 | abcdefghij

In other words, 5 firings within a very short time followed by one 10
seconds later. This behaviour was consistent over a 40 hour period.

Over a shorter period, replacing the string with '*:*:10' (?every 10
seconds?) gave
2022-08-11 15:27:01.045152 | abcdefghij
2022-08-11 15:27:01.045541 | abcdefghij
2022-08-11 15:27:01.046604 | abcdefghij
2022-08-11 15:27:01.04555 | abcdefghij
2022-08-11 15:27:01.048399 | abcdefghij
2022-08-11 15:27:10.042014 | abcdefghij
2022-08-11 15:27:10.042807 | abcdefghij

5 firings within 3 millisecs followed by 2 firings

Over a shorter period, replacing the string with '*:1:00' (?every 1
minute?) gave the same results as the '*:*;1' string.

Have I misunderstood the specification of the "on-calendar" parameter?

--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.58-desktop-2.mga8 kernel.
Mageia release 8 (Official) for x86_64

Re: Strange systemd timer behaviour

<op.1qtgvwfpa3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5062&group=alt.os.linux.mageia#5062

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux.mageia
Subject: Re: Strange systemd timer behaviour
Date: Fri, 12 Aug 2022 21:53:46 -0400
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <op.1qtgvwfpa3w0dxdave@hodgins.homeip.net>
References: <td56lc$2fhpr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="3ff84a8090998a8fe0f0079d200c06c3";
logging-data="2879395"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kJYw+tOosNptSDRMsGdlUGmqf80LlPaQ="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:PwxqeN6hiIKjtXpVLwV6wr4kaCk=
 by: David W. Hodgins - Sat, 13 Aug 2022 01:53 UTC

On Fri, 12 Aug 2022 05:31:30 -0400, Grimble <grimble@nomail.afraid.org> wrote:

> I was interested to see if I could launch a small program at one-second
> intervals, so I wrote a small python script to write a two variable row
> to a database (timestamp, 10 character string). Not wanting to create
> the X.service/X.timer entries in /etc/systemd/, I set up a transient
> systemd timer as follows:
> systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
> /home/graeme/Software/Python/write1.py
> expecting the '*:*:1' string to be interpreted as every second.
> However results were very strange:
> 2022-08-11 15:00:01.04493 | abcdefghij
> 2022-08-11 15:00:01.04534 | abcdefghij
<snip>
> Have I misunderstood the specification of the "on-calendar" parameter?

I've never used systemd-run. On Mageia 8 none of the man pages mention
--timer-property=AccuracySec. That may be something that was added in a
newer version of systemd.

Mageia 8 has version 246. The online documentation mentions "By default, the
timer will execute a random amount of time between when the specified time is
reached, and one minute after"

Since the m8 version doesn't appear to support the timer-property so gets the
random timing.

Cauldron currently has systemd version 251.

Are you using m8 or a cauldron install?

Regards, Dave Hodgins

Re: Strange systemd timer behaviour

<slrntfe3dr.1urj8.BitTwister@wb.home.test>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5063&group=alt.os.linux.mageia#5063

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: alt.os.linux.mageia
Subject: Re: Strange systemd timer behaviour
Date: Fri, 12 Aug 2022 21:34:35 -0500
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <slrntfe3dr.1urj8.BitTwister@wb.home.test>
References: <td56lc$2fhpr$1@dont-email.me>
<op.1qtgvwfpa3w0dxdave@hodgins.homeip.net>
Injection-Info: reader01.eternal-september.org; posting-host="a5a095ffdad6a4b79a712056de711f72";
logging-data="2883306"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qIT4xiB23rd2Q9SxpZoWgY4b4wNVwmvM="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:Xnpl8odRyQSG6x7ii10TkIQjDMY=
 by: Bit Twister - Sat, 13 Aug 2022 02:34 UTC

On Fri, 12 Aug 2022 21:53:46 -0400, David W. Hodgins wrote:
> On Fri, 12 Aug 2022 05:31:30 -0400, Grimble <grimble@nomail.afraid.org> wrote:
>
>> I was interested to see if I could launch a small program at one-second
>> intervals, so I wrote a small python script to write a two variable row
>> to a database (timestamp, 10 character string). Not wanting to create
>> the X.service/X.timer entries in /etc/systemd/, I set up a transient
>> systemd timer as follows:
>> systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
>> /home/graeme/Software/Python/write1.py
>> expecting the '*:*:1' string to be interpreted as every second.
>> However results were very strange:
>> 2022-08-11 15:00:01.04493 | abcdefghij
>> 2022-08-11 15:00:01.04534 | abcdefghij
><snip>
>> Have I misunderstood the specification of the "on-calendar" parameter?
>
> I've never used systemd-run. On Mageia 8 none of the man pages mention
> --timer-property=AccuracySec. That may be something that was added in a
> newer version of systemd.
>
> Mageia 8 has version 246. The online documentation mentions "By default, the
> timer will execute a random amount of time between when the specified time is
> reached, and one minute after"
>
> Since the m8 version doesn't appear to support the timer-property so gets the
> random timing.
>
> Cauldron currently has systemd version 251.
>
> Are you using m8 or a cauldron install?

A quick
man -k systemd | grep -i time
give several selections on my mga 8 release.

$ man systemd.timer
and doing a
/AccuracySec
for searching gets me a AccuracySec description.

Re: Strange systemd timer behaviour

<op.1qtk3m09a3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5064&group=alt.os.linux.mageia#5064

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: alt.os.linux.mageia
Subject: Re: Strange systemd timer behaviour
Date: Fri, 12 Aug 2022 23:24:48 -0400
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <op.1qtk3m09a3w0dxdave@hodgins.homeip.net>
References: <td56lc$2fhpr$1@dont-email.me>
<op.1qtgvwfpa3w0dxdave@hodgins.homeip.net>
<slrntfe3dr.1urj8.BitTwister@wb.home.test>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="3ff84a8090998a8fe0f0079d200c06c3";
logging-data="2893103"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Vrrug9iyYptBSI2A4XdqTesrdPdObMFQ="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:StTqhMZU4bmGfV6j+StCGzpDkmg=
 by: David W. Hodgins - Sat, 13 Aug 2022 03:24 UTC

On Fri, 12 Aug 2022 22:34:35 -0400, Bit Twister <BitTwister@mouse-potato.com> wrote:

> On Fri, 12 Aug 2022 21:53:46 -0400, David W. Hodgins wrote:
>> On Fri, 12 Aug 2022 05:31:30 -0400, Grimble <grimble@nomail.afraid.org> wrote:
>>
>>> I was interested to see if I could launch a small program at one-second
>>> intervals, so I wrote a small python script to write a two variable row
>>> to a database (timestamp, 10 character string). Not wanting to create
>>> the X.service/X.timer entries in /etc/systemd/, I set up a transient
>>> systemd timer as follows:
>>> systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
>>> /home/graeme/Software/Python/write1.py
>>> expecting the '*:*:1' string to be interpreted as every second.
>>> However results were very strange:
>>> 2022-08-11 15:00:01.04493 | abcdefghij
>>> 2022-08-11 15:00:01.04534 | abcdefghij
>> <snip>
>>> Have I misunderstood the specification of the "on-calendar" parameter?
>>
>> I've never used systemd-run. On Mageia 8 none of the man pages mention
>> --timer-property=AccuracySec. That may be something that was added in a
>> newer version of systemd.
>>
>> Mageia 8 has version 246. The online documentation mentions "By default, the
>> timer will execute a random amount of time between when the specified time is
>> reached, and one minute after"
>>
>> Since the m8 version doesn't appear to support the timer-property so gets the
>> random timing.
>>
>> Cauldron currently has systemd version 251.
>>
>> Are you using m8 or a cauldron install?
>
> A quick
> man -k systemd | grep -i time
> give several selections on my mga 8 release.
>
> $ man systemd.timer
> and doing a
> /AccuracySec
> for searching gets me a AccuracySec description.

That's for timer files such as /etc/systemd/system/fstrim.timer, not for the
systemd-run command.

Regards, Dave Hodgins

Re: Strange systemd timer behaviour

<tdgcul$35lf$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=5081&group=alt.os.linux.mageia#5081

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: grim...@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Re: Strange systemd timer behaviour
Date: Tue, 16 Aug 2022 16:26:23 +0100
Organization: A noiseless patient Spider
Lines: 64
Message-ID: <tdgcul$35lf$1@dont-email.me>
References: <td56lc$2fhpr$1@dont-email.me>
<op.1qtgvwfpa3w0dxdave@hodgins.homeip.net>
<slrntfe3dr.1urj8.BitTwister@wb.home.test>
<op.1qtk3m09a3w0dxdave@hodgins.homeip.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 16 Aug 2022 15:26:13 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="bc9e57d70438f269c6d5be57e8761bcb";
logging-data="104111"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fVUenHpqXAsI8aE8fixwP"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Cancel-Lock: sha1:2ibNk6y3vKaW6HfdoqLxjF4flPw=
In-Reply-To: <op.1qtk3m09a3w0dxdave@hodgins.homeip.net>
Content-Language: en-GB
 by: Grimble - Tue, 16 Aug 2022 15:26 UTC

On 13/08/2022 04:24, David W. Hodgins wrote:
> On Fri, 12 Aug 2022 22:34:35 -0400, Bit Twister
> <BitTwister@mouse-potato.com> wrote:
>
>> On Fri, 12 Aug 2022 21:53:46 -0400, David W. Hodgins wrote:
>>> On Fri, 12 Aug 2022 05:31:30 -0400, Grimble
>>> <grimble@nomail.afraid.org> wrote:
>>>
>>>> I was interested to see if I could launch a small program at one-second
>>>> intervals, so I wrote a small python script to write a two variable row
>>>> to a database (timestamp, 10 character string). Not wanting to create
>>>> the X.service/X.timer entries in /etc/systemd/, I set up a transient
>>>> systemd timer as follows:
>>>>   systemd-run --timer-property=AccuracySec=1us --on-calendar '*:*:1'
>>>> /home/graeme/Software/Python/write1.py
>>>> expecting the '*:*:1' string to be interpreted as every second.
>>>> However results were very strange:
>>>>   2022-08-11 15:00:01.04493  | abcdefghij
>>>>   2022-08-11 15:00:01.04534  | abcdefghij
>>> <snip>
>>>> Have I misunderstood the specification  of the "on-calendar" parameter?
>>>
>>> I've never used systemd-run. On Mageia 8 none of the man pages mention
>>> --timer-property=AccuracySec. That may be something that was added in a
>>> newer version of systemd.
>>>
>>> Mageia 8 has version 246. The online documentation mentions "By
>>> default, the
>>> timer will execute a random amount of time between when the specified
>>> time is
>>> reached, and one minute after"
>>>
>>> Since the m8 version doesn't appear to support the timer-property so
>>> gets the
>>> random timing.
>>>
>>> Cauldron currently has systemd version 251.
>>>
>>> Are you using m8 or a cauldron install?
>>
>> A quick
>>   man -k systemd | grep -i time
>> give several selections on my mga 8 release.
>>
>> $ man systemd.timer
>> and doing a
>>    /AccuracySec
>> for searching gets me a AccuracySec description.
>
> That's for timer files such as /etc/systemd/system/fstrim.timer, not for
> the
> systemd-run command.
>
> Regards, Dave Hodgins
Thanks both for your comments. After further reading and testing, it
seems not to be possible to have a shorter timer interval than 1 minute.
(Oops- it also seems that the multiple entries was because I had left
more than one timer running)
--
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.15.58-desktop-2.mga8 kernel.
Mageia release 8 (Official) for x86_64

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor