banshee is under active development: collectors will keep changing, and a version you publish will likely need adjustments. For stable use, wait for version 1.0.0.

Linux

banshee/linux-collection/linux/ssh/

clock

Offset of a Linux clock from a time server: date by SSH against NTP.

  • linux
  • ssh
  • ntp
  • clock
  • time
  • alpine
  • debian
  • fedora

by banshee1 installation2 versions

v2Latest

Published on October 28, 2026. One naming convention across collections; documentation completed.

Clock of a Linux, by SSH

Returns the offset of the machine's clock from a time server, with and without its sign. Positive, the clock is ahead; negative, it is behind.

Versions

Generic: date +%s is known by BusyBox and GNU coreutils, and gives UTC seconds with no time zone to guess.

How it works

The collector runs date +%s on the machine (the seconds since 1 January 1970 UTC), then asks the time server named by protocol:ntp:server (pool.ntp.org when empty) with one NTP client request.

  • The server's time is brought back to the middle of the SSH call, measured by the poller's clock: neither the SSH round trip nor the time between the two readings counts in the offset, nor the poller's own clock error.
  • date truncates to the second: half a second is added, the middle of the second the true time lies in.
  • Nothing is written on the target.

Prerequisites

  • an SSH account for monitoring, without write rights;
  • the fingerprint of the server's host key, set in protocol:ssh:fingerprint (not needed when the Security settings trust the first SSH fingerprint presented);
  • the poller reaching the time server on UDP port 123.

Outputs

NameLabelUnitPer instance
offsetOffset from the time serversno
driftOffset, without its signsno

Watches

NameTitleKindDefaultsChecked by default
clock-driftClock offabove a threshold, on driftwarning above 5 s, critical above 60 syes

Limits

  • The offset is read to about one second: the SSH call, connection included, is a second long at worst. The default thresholds stay far above it.
  • A time server that does not answer stops the collector unreachable.