clockcheck - compare clock times on several hosts

clockcheck connects to the time service (TCP port 37) on the named list of hosts and prints their reported time. It also flags hosts that are more than a specified number of seconds off from the current host.

It is intended as an administrative tool to poll a bunch of hosts and find ones where the clock has drifted too far.


    clockcheck -t 4

Compares the current host to and It will print a warning if either of the remote hosts reports a time that is more than 4 seconds different from the local host.

Get clockcheck

gzipped source
.zip source

The definitive source is available from my source archives.

Note: The manual page below is produced using man2html. There are several formatting gliches which are unavoidable at this time. A correctly formatted manual page is in the file clockcheck.txt in the package.

       clockcheck - compare times on a set of hosts

       clockcheck [-q] [-S] [-t threshold] [-p port] host ...

       Clockcheck  compares  the  clocks  of  a  set  of hosts as
       reported by the time service on port 37.    It  flags  any
       hosts that have a time differing from this host by a user-
       specified delta.    This can be used to quickly check  all
       machines  in  a farm to see if any of them have lost their
       clock synchronization.

       It can also be used to set the system  clock  by  snarfing
       the  value of another system.   When run from crontab this
       way it makes a poor man's xntpd.  For example

          * * * * * /usr/local/bin/clockcheck -S timehost >/dev/null

       -q        Quiet mode.  Do not print names  of  hosts  that
                 have the correct time.

       -S        Set  the  clock  based on the average difference
                 from all  the  remote  machines.   You  must  be
                 super-user to do this.

       -t threshold
                 Specify  the allowed time difference in seconds.
                 (Default: 0)

       -p port   Use specified port rather than 37.

       clockcheck -t 10

       Tony Aiuto  <>

Comments and money to