beware sntp

a Simple Network Time Protocol client/server for windows.

download

current version: 1.5.3

bsntp.zip

features:

changelog

changes in 1.5.3

changes in 1.5.2

changes in 1.5.1

changes in 1.5

changes in 1.41

changes in 1.4

changes in 1.3

changes in 1.2

changes in 1.1

manual

follow these steps in order to set up beware sntp. i assume you have basic knowledge of windows, networking, editing config files, etc. i am not responsible if you damage something.

make a directory, unzip the contents of the zip into that directory.

bsntp.ini

edit bsntp.ini to options which you prefer

explanation of options:

server= 0 or 1
if "1", program runs as server, allowing other sntp clients to sync to it.

ServerPort= number
port on which the server listens. the NTP port is 123.

ServerInterface= IP
interface on which the server listens. if you dont know what this means, leave it empty. to set multiple IP addresses, give a comma separated list

UpdateFrequency= number
each nnnn seconds, the program conacts NTP servers and adjusts the clock.

TimeOut= number
seconds to wait for a reply of a server before moving on to the next server.

LogFlags= number
which events to log (bitmask): -1 = everything, 2=all adjustments, 4=misc, 8=start/stop,
16=difference between server, 32=drift internal status, 64=network related errors, 128=dns lookups,
256=reponses, 512=response detailed information, 1024=requests from clients, 2048=other errors

UpdateOnce= 0 or 1.
if "1", program contacts servers and updates clock once, then quits.

MaxLag= number (float)
consider replies with more lag, in seconds, than this, invalid.

MaxAdjustment= number
if the adjustment is more than this, in seconds, and drift is enabled, make an adjustment of "maxadjustment"

IgnoreHighestLag= 0 or 1
if enabled, and multiple servers are configured, ignore the reply with the highest latency (useful to deal with lag spikes)

AdjustDrift= 0 or 1
measure drift and update/write the value.

ApplyDrift= 0 or 1
change the PC clock to compensate for known drift, by stepping with 1 ms at a time.

servers.ini

in servers.ini, fill in the hostname or IP address of servers, one per line. optional "host port". Note that servers.ini is read every time the program performs an update; you can modify it without stopping/starting the program. note that this is *not* windows ini (name=value) format.

automatic startup

windows 9x/ME: in the registry or startup folder, or using a program known as "Custom Startup", put an entry for this program, to cause it to start each time you start the pc.

Windows NT/2000/XP: installing as system service: on the command prompt, being in the directory of bsntp, enter "bsntp install". you can "type output.txt" to see if it succeeded. then you can do "net start bewaresntp" and/or set the service to start automatically, using control panel/services.

uninstalling

if you made one, first remove the auto-start entry. if you installed the program as NT service, on the command prompt, in the bsntp directory, type "bsntp uninstall", read output.txt to verify correct uninstall. if the program still runs, stop it (by using Ctrl+Alt+Del). now you can delete the bsntp folder and its contents.

notes

- if you choose to run bsntp as server for a LAN, it may be wise to block the port to internet, using the firewall. if you have the choice, only have the port listen on the LAN interface. If you don't need it, disable the server functionality. read the "bsntp.ini" section for this.

- bsntp can act as time server without acting as time client, if you use an empty servers.ini. this can be of use if something else synchs the clock.