FreeBSD

Run as root:
# pkg install mono
# pkg install gtk-sharp20 (only for GUI)
# pkg install libgdiplus (only for graphs)
# pkg install mysql-server


Ubuntu

Run:
# sudo apt-get install mono-complete
# sudo apt-get install gtk-sharp2  (only for GUI)
# sudo apt-get install libgdiplus (only for graphs)
# sudo apt-get install mysql-server
# sudo apt-get install ntp


Windows

Download a copy of ntpq and ntpdc. Make sure .NET is installed and
the required MySQL Server is accessible. Download and install MySQL
if needed.


Install

Build the solution with:
# make

Build a pure server version (no GTK) with:
# make server

Copy the output files in the bin folder to /opt/ntpa or any other
suitable location and copy ntpa.stat.conf from example to
/etc/ntpa.conf


Configuration

In ntpa.conf Hostname must point to a name or IP reachable by ntpq.
ConfigFile must must point to ntp.conf. ConfigFile is only needed
when generating graphs and pages. Adjust the values of HostName and
ConfigFile settings accordingly.

Set database user name and password in the top of ntpa.conf. Leave the
Create setting to 1 if you want all tables and data created automatically.
Be sure the user you entered in ntpa.conf exists in your MySQL database.

If you want to generate graphs and pages then also copy ntp.conf from
NTP host to the machine running ntpa and add timeserver ID from
support.ntp.org. Search using google.com with f.x.
"ntp1.innolan.net" site:support.ntp.org
For servers not registered on support.ntp.org just add 10000 and above.
See ntp.conf in examples on how to add time server IDs.


Configuration can be validated with the validation tool:
# mono ntpav.exe /etc/ntpa.conf

Use phpMyAdmin, MySQL Workbench or similar to adjust auto generated
values in the database.

Start ntpa and watch the data arriving in MySQL tables.
# mono ntpa.exe

The log file contains errors and other clues for debugging.

To stop ntpa use:
# mono ntpa.exe stop

To start ntpa in daemon mode:
# mono ntpa.exe &

GTK GUI
Run Ntp.Analyzer.Gui.exe and connect to ntpa with the a port specified
in the listener section. The GTK GUI is experimental as does not support
SQL configuration and error handling. Use it at your own risk.

Connect to ntpa and get a list of available commands:
# ntpac 127.0.0.1 9070 help

Ask ntpa how long time it has been running:
# ntpac 127.0.0.1 9070 uptime
