Understanding the effect of AccuracySec=

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

 

I have defined a time using

 

[Timer]

_OnCalendar_=daily

AccuracySec=6h

Persistent=true

 

And the idea was to run the unit daily, but it’s rather unimportant when, just nout in prime hours.

 

The man page says:

 

       AccuracySec=

           Specify the accuracy the timer shall elapse with. Defaults to 1min.

           The timer is scheduled to elapse within a time window starting with

           the time specified in _OnCalendar_=, _OnActiveSec_=, _OnBootSec_=,

           _OnStartupSec_=, _OnUnitActiveSec_= or _OnUnitInactiveSec_= and ending

           the time configured with AccuracySec= later. Within this time

           window, the expiry time will be placed at a host-specific,

           randomized but stable position that is synchronized between all

           local timer units. This is done in order to distribute the wake-up

           time in networked installations, as well as optimizing power

           consumption to suppress unnecessary CPU wake-ups. To get best

           accuracy, set this option to 1us. Note that the timer is still

           subject to the timer slack configured via systemd-system.conf(5)'s

           TimerSlackNSec= setting. See prctl(2) for details. To optimize

           power consumption, make sure to set this value as high as possible

           and as low as necessary.

 

So I expected that multiple instances of the timer would be “spread”, but instead I see all instances started at 00:00:01.

So did I misunderstand, or is it some kind of bug with timer instances? Systemd being used is old systemd-228-157.60.1.x86_64 in SLES 12 SP5…

 

Or is

 

[Install]

WantedBy=timers.target

 

Causing this?

 

 

Kind regards,

Ulrich

 


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux