Re: [systemd-devel] Are there repeating monotonic timers?

2018-09-03 Thread Wojtek Swiatek
Le lun. 3 sept. 2018 à 17:30, Jérémy Rosen  a écrit :

> You can put multiple criterion in a single .timer
>
> In your case, combining OnBootSec and OnUnitActiveSec should do what you
> want...
>
>
Thank you - that was it.

OnBootSec=60s
OnUnitActiveSec=60s

I did not realize that  OnUnitActiveSec would be triggered by the
OnBootSec-started service, and then triggered by its last run.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Are there repeating monotonic timers?

2018-09-03 Thread Jérémy Rosen

You can put multiple criterion in a single .timer

In your case, combining OnBootSec and OnUnitActiveSec should do what you 
want...


HTH
Jeremy

On 03/09/2018 17:28, Wojtek Swiatek wrote:

Hello everyone

I would like to have a timer which runs every 60 seconds after the machine
is booted.
I thought that OnBootSec would be the right parameter but this is s a one
shot call - it starts 60 seconds after the boot  and then the service is
done (does not restart ever)

Is there a way to start a service every 60 seconds (this is an example),
short of using OnCalendar and fixed times (including /x notation, but then
end up at fixed dates/times anyway)?

Thanks



___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


--
SMILE 

20 rue des Jardins
92600 Asnières-sur-Seine


*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS

email jeremy.ro...@smile.fr 
phone +33141402967
url http://www.smile.eu

Twitter  Facebook 
 LinkedIn 
 Github 




Découvrez l’univers Smile, rendez-vous sur smile.eu 



eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Are there repeating monotonic timers?

2018-09-03 Thread Wojtek Swiatek
Hello everyone

I would like to have a timer which runs every 60 seconds after the machine
is booted.
I thought that OnBootSec would be the right parameter but this is s a one
shot call - it starts 60 seconds after the boot  and then the service is
done (does not restart ever)

Is there a way to start a service every 60 seconds (this is an example),
short of using OnCalendar and fixed times (including /x notation, but then
end up at fixed dates/times anyway)?

Thanks
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Enforcing journald diskspace limit.

2018-09-03 Thread Frédéric HILPERT

Hi,

Doesn't anybody experienced the same issue with systemd-journald ?

Best regards,

Frédéric HILPERT

On 20/08/18 14:08, Frédéric HILPERT wrote:

Hi,

I have a question about systemd. Not wanting to create an issue on 
githbub because there are already plenty and this may not be a bug.


I have a 1GB /var/log/ partition (on a stock Centos 7) and set 
SystemMaxUse=150M in journald configuration. When I restart journald I 
have this message :


/systemd-journal[53564]: Permanent journal is using 8.0M (max allowed 
101.4M, trying to leave 152.1M free of 501.0M available → current 
limit 101.4M).//

/
Everything looks fine here, but a few days later :
/
//MyServer# journalctl --disk-usage //
//Archived and active journals take up 232.8M on disk.//
//MyServer# du -sh /var/log/journal///
//185M    /var/log/journal//

--> Am I missing something in order to enforce journal not use more 
than 150 (or 101.4)MB ?


Regards,
Frédéric HILPERT


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-timesyncd dies on one machine but runs okay on another

2018-09-03 Thread Mantas Mikulėnas
On Mon, Sep 3, 2018 at 3:41 PM Manuel Wagesreither 
wrote:

> Hallo all!
>
> I'm working on an embedded project consisting of an host and numerous
> virtual machines and am facing problems related to time management.
> systemd-timesyncd dies on one machine (HOST), but runs okay on another
> (VM2) with identical config.
>
> The project setup is as follows:
>
> HOST: Runs a (heavily) modified Debian with systemd, retrieves time via
> NTP from VM3 using systemd-timesyncd.
> * VM1: Runs openwrt and serves time via NTP using chrony
> * VM2: Runs a (heavily) modified Debian with SELINUX and systemd,
> retrieves time via NTP from VM3 using systemd-timesyncd
> * VM3-?: Some other VMs which seem to run fine
>
> The symptoms are as follows:
>
> HOST: `systemd-timesyncd.service` is reported as inactive (dead). A time
> update (adjusting the time by 2 days) took place. Then, after 5min, the
> service died. (It always seems to die 5-15min after a time update.)
> ```
> root@HOST:/var/log# systemctl status systemd-timesyncd
> ● systemd-timesyncd.service - Network Time Synchronization
>Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled;
> vendor preset: enabled)
>   Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
>└─disable-with-time-daemon.conf
>Active: inactive (dead) since Wed 2018-09-05 07:30:02 CEST; 1 day 17h
> left
>  Docs: man:systemd-timesyncd.service(8)
>   Process: 4724 ExecStart=/lib/systemd/systemd-timesyncd (code=exited,
> status=0/SUCCESS)
>  Main PID: 4724 (code=exited, status=0/SUCCESS)
>Status: "Idle."
>
> Sep 03 11:51:58 konnektor systemd[1]: Starting Network Time
> Synchronization...
> Sep 03 11:51:58 konnektor systemd[1]: Started Network Time Synchronization.
> Sep 05 07:25:31 konnektor systemd-timesyncd[4724]: Synchronized to time
> server 192.168.253.1:123 (192.168.253.1).
> Sep 05 07:30:02 konnektor systemd[1]: Stopping Network Time
> Synchronization...
> Sep 05 07:30:02 konnektor systemd[1]: Stopped Network Time Synchronization.
> ```
>

Looks like a normal exit, though. What systemd version is this? For v217 or
later I'd expect to see _Status: "Shutting down"_...

Try starting it with [Service] Environment="SYSTEMD_LOG_LEVEL=debug" to see
more details.



> systemd-timesyncd configuration for both HOST and VM2
> ```
> root@HOST, VM2:/var/log# cat /lib/systemd/system/systemd-networkd.service
>

That's not timesyncd...

-- 
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd-timesyncd dies on one machine but runs okay on another

2018-09-03 Thread Manuel Wagesreither
Sorry, some typos. The time server is VM1, not VM3.

Please find a corrected version below.

~~~

Hello all!

I'm working on an embedded project consisting of an host and numerous virtual 
machines and am facing problems related to time management. systemd-timesyncd 
dies on one machine (HOST), but runs okay on another (VM2) with identical 
config.

The project setup is as follows:

HOST: Runs a (heavily) modified Debian with systemd, retrieves time via NTP 
from VM1 using systemd-timesyncd.
* VM1: Runs openwrt and serves time via NTP using chrony
* VM2: Runs a (heavily) modified Debian with SELINUX and systemd, retrieves 
time via NTP from VM1 using systemd-timesyncd
* VM3-?: Some other VMs which seem to run fine

The symptoms are as follows:

HOST: `systemd-timesyncd.service` is reported as inactive (dead). A time update 
(adjusting the time by 2 days) took place. Then, after 5min, the service died. 
(It always seems to die 5-15min after a time update.)
```
root@HOST:/var/log# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; 
vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
   └─disable-with-time-daemon.conf
   Active: inactive (dead) since Wed 2018-09-05 07:30:02 CEST; 1 day 17h left
 Docs: man:systemd-timesyncd.service(8)
  Process: 4724 ExecStart=/lib/systemd/systemd-timesyncd (code=exited, 
status=0/SUCCESS)
 Main PID: 4724 (code=exited, status=0/SUCCESS)
   Status: "Idle."

Sep 03 11:51:58 konnektor systemd[1]: Starting Network Time Synchronization...
Sep 03 11:51:58 konnektor systemd[1]: Started Network Time Synchronization.
Sep 05 07:25:31 konnektor systemd-timesyncd[4724]: Synchronized to time server 
192.168.253.1:123 (192.168.253.1).
Sep 05 07:30:02 konnektor systemd[1]: Stopping Network Time Synchronization...
Sep 05 07:30:02 konnektor systemd[1]: Stopped Network Time Synchronization.
```

VM2:`systemd-timesyncd.service` is reported to be active (running), time 
updates occur regularly.
```
root@VM2:~# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; 
vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
   └─disable-with-time-daemon.conf
   Active: active (running) since Thu 2018-08-30 20:53:19 CEST; 5 days ago
 Docs: man:systemd-timesyncd.service(8)
 Main PID: 12125 (systemd-timesyn)
   Status: "Synchronized to time server 192.168.253.1:123 (192.168.253.1)."
Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
   └─12125 /lib/systemd/systemd-timesyncd

Aug 30 20:53:19 k-basisdienste systemd[1]: Starting Network Time 
Synchronization...
Aug 30 20:53:19 k-basisdienste systemd[1]: Started Network Time Synchronization.
Aug 30 20:44:53 k-basisdienste systemd-timesyncd[12125]: Synchronized to time 
server 192.168.253.1:123 (192.168.253.1).
```
On this VM, we DO have the problem of the time jumping by 15s every 50s or so. 
I think is caused by the time server (chrony) over-compensating a clockdrift. 
Hence, I think this is totally unrelated. I just mention it for the sake of 
completeness.

When I query chrony on VM1 for statistics on the connected clients, it as well 
reports that the other VMs are updated every ~50s, while the last update to the 
host system occured hours ago.
```
root@VM1:~# chronyc clients
Hostname  NTP   Drop Int IntL Last Cmd   Drop Int  Last
===
192.168.253.14  11054  0   6   - 1   0  0   - -
192.168.253.10  11053  0   6   - 1   0  0   - -
192.168.253.2   11053  0   6   - 1   0  0   - -
192.168.253.18  11053  0   6   - 1   0  0   - -
192.168.253.3 390  0  10   -  237m   0  0   - - 
 COMMENT: This is the host machine
```

systemd-timesyncd on both HOST and VM2 are using an identical unit file and 
also timesyncd.conf (Please find both below.)


Questions I'm asking myself are:
* What could be the reason for systemd-timesyncd dying on the host machine? How 
can I find details?
* If I interpret the output correctly, systemd-timesyncd died with an exit code 
of 0 (success). How is that possible? Shouldn't it remain active, just the way 
it does on VM2?


Thanks a lot for your support!
Manuel


systemd-timesyncd configuration for both HOST and VM2
```
root@HOST, VM2:/var/log# cat /lib/systemd/system/systemd-networkd.service
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the 

[systemd-devel] systemd-timesyncd dies on one machine but runs okay on another

2018-09-03 Thread Manuel Wagesreither
Hallo all!

I'm working on an embedded project consisting of an host and numerous virtual 
machines and am facing problems related to time management. systemd-timesyncd 
dies on one machine (HOST), but runs okay on another (VM2) with identical 
config.

The project setup is as follows:

HOST: Runs a (heavily) modified Debian with systemd, retrieves time via NTP 
from VM3 using systemd-timesyncd.
* VM1: Runs openwrt and serves time via NTP using chrony
* VM2: Runs a (heavily) modified Debian with SELINUX and systemd, retrieves 
time via NTP from VM3 using systemd-timesyncd
* VM3-?: Some other VMs which seem to run fine

The symptoms are as follows:

HOST: `systemd-timesyncd.service` is reported as inactive (dead). A time update 
(adjusting the time by 2 days) took place. Then, after 5min, the service died. 
(It always seems to die 5-15min after a time update.)
```
root@HOST:/var/log# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; 
vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
   └─disable-with-time-daemon.conf
   Active: inactive (dead) since Wed 2018-09-05 07:30:02 CEST; 1 day 17h left
 Docs: man:systemd-timesyncd.service(8)
  Process: 4724 ExecStart=/lib/systemd/systemd-timesyncd (code=exited, 
status=0/SUCCESS)
 Main PID: 4724 (code=exited, status=0/SUCCESS)
   Status: "Idle."

Sep 03 11:51:58 konnektor systemd[1]: Starting Network Time Synchronization...
Sep 03 11:51:58 konnektor systemd[1]: Started Network Time Synchronization.
Sep 05 07:25:31 konnektor systemd-timesyncd[4724]: Synchronized to time server 
192.168.253.1:123 (192.168.253.1).
Sep 05 07:30:02 konnektor systemd[1]: Stopping Network Time Synchronization...
Sep 05 07:30:02 konnektor systemd[1]: Stopped Network Time Synchronization.
```

VM2:`systemd-timesyncd.service` is reported to be active (running), time 
updates occur regularly.
```
root@VM2:~# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; 
vendor preset: enabled)
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
   └─disable-with-time-daemon.conf
   Active: active (running) since Thu 2018-08-30 20:53:19 CEST; 5 days ago
 Docs: man:systemd-timesyncd.service(8)
 Main PID: 12125 (systemd-timesyn)
   Status: "Synchronized to time server 192.168.253.1:123 (192.168.253.1)."
Tasks: 2 (limit: 4915)
   CGroup: /system.slice/systemd-timesyncd.service
   └─12125 /lib/systemd/systemd-timesyncd

Aug 30 20:53:19 k-basisdienste systemd[1]: Starting Network Time 
Synchronization...
Aug 30 20:53:19 k-basisdienste systemd[1]: Started Network Time Synchronization.
Aug 30 20:44:53 k-basisdienste systemd-timesyncd[12125]: Synchronized to time 
server 192.168.253.1:123 (192.168.253.1).
```
On this VM, we DO have the problem of the time jumping by 15s every 50s or so. 
I think is caused by the time server (chrony) over-compensating a clockdrift. 
Hence, I think this is totally unrelated. I just mention it for the sake of 
completeness.

When I query chrony on VM1 for statistics on the connected clients, it as well 
reports that the other VMs are updated every ~50s, while the last update to the 
host system occured hours ago.
```
root@VM1:~# chronyc clients
Hostname  NTP   Drop Int IntL Last Cmd   Drop Int  Last
===
192.168.253.14  11054  0   6   - 1   0  0   - -
192.168.253.10  11053  0   6   - 1   0  0   - -
192.168.253.2   11053  0   6   - 1   0  0   - -
192.168.253.18  11053  0   6   - 1   0  0   - -
192.168.253.3 390  0  10   -  237m   0  0   - - 
 COMMENT: This is the host machine
```

systemd-timesyncd on both HOST and VM2 are using an identical unit file and 
also timesyncd.conf (Please find both below.)


Questions I'm asking myself are:
* What could be the reason for systemd-timesyncd dying on the host machine? How 
can I find details?
* If I interpret the output correctly, systemd-timesyncd died with an exit code 
of 0 (success). How is that possible? Shouldn't it remain active, just the way 
it does on VM2?


Thanks a lot for your support!
Manuel


systemd-timesyncd configuration for both HOST and VM2
```
root@HOST, VM2:/var/log# cat /lib/systemd/system/systemd-networkd.service
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Network Service