mirror of
https://bitbucket.org/anguist/ntpa
synced 2025-10-05 18:41:13 +00:00
87 lines
2.1 KiB
Plaintext
87 lines
2.1 KiB
Plaintext
Install Dependencies
|
|
--------------------
|
|
|
|
FreeBSD
|
|
-------
|
|
|
|
Run as root:
|
|
# pkg install mono
|
|
# pkg install libgdiplus
|
|
# pkg install mysql-server
|
|
|
|
Ubuntu
|
|
------
|
|
|
|
Run:
|
|
# sudo apt-get install mono-runtime
|
|
# sudo apt-get install libgdiplus
|
|
# sudo apt-get install mysql-server
|
|
|
|
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.
|
|
|
|
|
|
Configure ntpa
|
|
--------------
|
|
|
|
Copy ntpa.stat.conf from example to /etc/ntpa.conf
|
|
In ntpa.conf Hostname must point to a name or IP reachable by ntpq.
|
|
ConfigFile must must point to ntp.conf.
|
|
Adjust the values of HostName and ConfigFile settings accordingly.
|
|
|
|
Validate ntpa.conf file with ntpav using:
|
|
# ntpav /etc/ntpa.conf
|
|
|
|
Copy ntp.conf from NTP host to the machine running ntpa and then 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 example on how to add time server IDs.
|
|
|
|
Configure database
|
|
------------------
|
|
|
|
Now adjust create_data.sql with real values. For host rows:
|
|
name is name used to query with ntpdc. Must match name/ip in ntpa.conf
|
|
ip is IP address as shown in generated web pages
|
|
orgId is ID from support.ntp.org. Use 10000 or above for non registered servers
|
|
|
|
For peer rows:
|
|
name is name shown in generated web pages
|
|
ip is IP address as received from ntpq -pn
|
|
orgId is ID from support.ntp.org. Use 10000 or above for non registered servers
|
|
|
|
Run:
|
|
# mysql < run create_tables.sql
|
|
# mysql < run create_data.sql
|
|
|
|
|
|
Start NTP Analyzer
|
|
------------------
|
|
|
|
Now start ntpa and watch the data arriving in MySQL tables.
|
|
# mono ntpa.exe
|
|
|
|
Also watch the logfile for errors and other debugging activities.
|
|
|
|
Now start ntpa in daemon mode with:
|
|
# &ntpa.exe
|
|
|
|
To stop ntpa use kill. Find ntpa pid in log file.
|
|
# kill 77342
|
|
|
|
GTK GUI
|
|
Run Ntp.Analyzer.Gui.exe and connect to ntpa with the a port specified
|
|
in the listener section.
|
|
|
|
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
|