Allow fleetctl list-units to retrieve per-unit uptime from systemd, for example:
localhost # ./fleet/fleetctl list-units
UNIT MACHINE ACTIVE SUB UPTIME
world.service 06ecd4f7.../192.168.122.30 active running 2015-07-06 07:38:38 AM UTC, Since 11m39s
world2.service 1d3430ef.../192.168.122.31 active running 2015-07-06 07:48:24 AM UTC, Since 1m54s
world_glob.service 06ecd4f7.../192.168.122.30 active running 2015-07-06 07:48:00 AM UTC, Since 2m18s
world_glob.service 1d3430ef.../192.168.122.31 active running 2015-07-06 07:47:59 AM UTC, Since 2m18s
What's changed since #1293:
Avoided unnecessary iteration for each unit when fetching systemd properties. Instead make use of setting internal UnitState, both for the normal loop for systemd (>= 230) and for the fallback loop for systemd (<= 229).
Fixed typos and bugs in registry and schema
Excluded ActiveEnterTimestamp from unit comparison condition.
Allow
fleetctl list-units
to retrieve per-unit uptime from systemd, for example:What's changed since #1293:
UnitState
, both for the normal loop for systemd (>= 230) and for the fallback loop for systemd (<= 229).ActiveEnterTimestamp
from unit comparison condition.UTC
to the outputFixes https://github.com/coreos/fleet/issues/1128 Supersedes https://github.com/coreos/fleet/pull/1293 /cc @wuqixuan