Files
ntpa/INSTALL
T
2016-03-22 19:17:12 +01:00

93 lines
2.6 KiB
Plaintext

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
On FreeBSD copy content of bin to /usr/local/ntpa/
Copy example/ntpa.stat.conf to /usr/local/etc/ntpa/ntpa.conf
Copy script/ntpa to /usr/local/etc/rc.d/ntpa
Touch /var/log/ntpa.log and adjust pid file location if needed.
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 kill. Find the process id in the log file.
# kill 72354
To start ntpa in daemon mode:
# mono ntpa.exe &
On FreeBSD use the rc.d script to start and stop the deamon.
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