Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Imagination is more important than knowledge. -- Albert Einstein


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

SubjectAuthor
o Strange systemd timer behaviourGrimble

1
Strange systemd timer behaviour

<td39ds$277d7$1@dont-email.me>

  copy mid

http://rslight.i2p/computers/article-flat.php?id=6059&group=alt.os.linux.mageia#6059

  copy link   Newsgroups: alt.os.linux.mageia
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: grimble@nomail.afraid.org (Grimble)
Newsgroups: alt.os.linux.mageia
Subject: Strange systemd timer behaviour
Date: Thu, 11 Aug 2022 17:06:25 +0100
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <td39ds$277d7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 11 Aug 2022 16:06:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="8768281f33dcdaf53bccdfc0d9807e58";
logging-data="2334119"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JZNb4JmNmjX9DuDscZkus"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.0.2
Cancel-Lock: sha1:oWDHqtjKDSLlst+e9qVzIR94fmQ=
Content-Language: en-GB
 by: Grimble - Thu, 11 Aug 2022 16:06 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


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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor