You are not logged in.

#1 2015-07-30 01:32:10

johnp636
Member
From: St. Louis, MO, USA
Registered: 2013-12-30
Posts: 21

systemctl --list-timers gives unexpected results

With a few OnCalendar timers set up, systemctl --list-timers shows some "ago" values under the "LEFT" column.  It seems that the "LEFT" column should only show times to the next elapse.  Also, the "NEXT" column shows times that are in the past.  Are these bugs? 

I was planning to make a web front-end to systemctl --list-timers, but if the output isn't correct, I'll have to get this information from systemd another way.  Any pointers? 

$ systemctl list-timers "record_*"
NEXT                         LEFT           LAST                         PASSED       UNIT                             ACTIVATES
n/a                          n/a            Tue 2015-07-28 19:00:01 CDT  1 day 1h ago record_the_bomb.timer            record_the_bomb.service
Tue 2015-07-28 21:00:00 CDT  23h ago        Tue 2015-07-28 21:00:00 CDT  23h ago      record_hometime.timer            record_hometime.service
Wed 2015-07-29 20:00:00 CDT  44s ago        Wed 2015-07-29 20:00:00 CDT  44s ago      record_nova_meltdown.timer       record_nova_meltdown.service
Wed 2015-07-29 21:00:00 CDT  59min left     Tue 2015-07-28 21:00:00 CDT  23h ago      record_uranium.timer             record_uranium.service
Thu 2015-07-30 17:30:00 CDT  21h left       Wed 2015-07-29 17:30:00 CDT  2h 30min ago record_abc_news.timer            record_abc_news.service
[...]
$ cat /etc/systemd/system/record_hometime.timer 
[Unit]
Description=Record Hometime
[Timer]
OnCalendar=*-*-* 21:00:00
[Install]
WantedBy=timers.target
$ pacman -Q systemd
systemd 219-6

Offline

#2 2015-07-30 01:37:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: systemctl --list-timers gives unexpected results

Why are you running such an out of date version of systemd?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-07-30 01:42:26

johnp636
Member
From: St. Louis, MO, USA
Registered: 2013-12-30
Posts: 21

Re: systemctl --list-timers gives unexpected results

Excellent question.  This is a PVR backend and media server machine, and somehow, I rarely find time to take it down for updates.  Let me update and see if the behavior changes.

Offline

#4 2015-07-30 03:35:37

johnp636
Member
From: St. Louis, MO, USA
Registered: 2013-12-30
Posts: 21

Re: systemctl --list-timers gives unexpected results

After an update to systemd 222-1 and a reboot, I don't see times in the past under the "LEFT" column.  The version update seems to have fixed it, assuming that merely rebooting didn't.

Offline

#5 2015-08-08 01:22:39

johnp636
Member
From: St. Louis, MO, USA
Registered: 2013-12-30
Posts: 21

Re: systemctl --list-timers gives unexpected results

It appears that systemd 223-1 on my Arch Linux ARM (Raspberry Pi 2) can still show "ago" values in the "LEFT" column and a past time in the "NEXT" column.  This is an example:

$ systemctl list-timers
NEXT                         LEFT          LAST                         PASSED       UNIT                             ACTIVATES
Fri 2015-08-07 20:00:00 CDT  18min ago     Fri 2015-08-07 20:00:03 CDT  18min ago    record_masters_of_illusion.timer record_masters
Sat 2015-08-08 00:00:00 CDT  3h 41min left Fri 2015-08-07 00:00:03 CDT  20h ago      logrotate.timer                  logrotate.serv

I know that Arch Linux ARM is not supported on this forum, but the point is that what I saw in the original post is not an upstream systemd bug that has been fixed, at least as of 223.

Offline

Board footer

Powered by FluxBB