1
0
mirror of https://bitbucket.org/anguist/ntpa synced 2025-10-06 19:12:11 +00:00

Updated documentation

This commit is contained in:
2016-03-22 19:17:12 +01:00
parent 29b0f80e22
commit cbcc1081f3
4 changed files with 38 additions and 145 deletions

11
INSTALL
View File

@ -36,6 +36,11 @@ 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
@ -67,12 +72,14 @@ Start ntpa and watch the data arriving in MySQL tables.
The log file contains errors and other clues for debugging.
To stop ntpa use:
# mono ntpa.exe stop
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

View File

@ -40,20 +40,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ntp.Process", "Ntp.Process\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NPlot", "NPlot\NPlot.csproj", "{C2DEBED1-FE91-4929-B686-8E920731E88C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{79DFB57F-58FD-4F34-A722-60E3B598EBE8}"
ProjectSection(SolutionItems) = preProject
config\ntpa.s1.conf = config\ntpa.s1.conf
INSTALL = INSTALL
example\ntp.conf = example\ntp.conf
example\ntpa.stat.conf = example\ntpa.stat.conf
example\ntpa.web.conf = example\ntpa.web.conf
example\ntpa.graph.conf = example\ntpa.graph.conf
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySql.Data", "MySql\Source\MySql.Data\MySql.Data.csproj", "{E9DF5ED1-4CBD-4226-B931-9A51610AC14D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ntp.System", "Ntp.System\Ntp.System.csproj", "{A98DB601-2993-4181-A573-5FCCC5E954C1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{6D7079EB-9FEE-4EC7-AA28-3671C607FDC6}"
ProjectSection(SolutionItems) = preProject
example\ntp.conf = example\ntp.conf
example\ntpa.graph.conf = example\ntpa.graph.conf
example\ntpa.stat.conf = example\ntpa.stat.conf
example\ntpa.web.conf = example\ntpa.web.conf
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

View File

@ -1,113 +0,0 @@
#####################################################################
# Configuration for NTP Analyzer - Statistic configuration - S1 #
# - This file is used as configuration in a production environment. #
#####################################################################
Database {
Host 172.20.83.1
Name ntpa
User ntpau
Pass xx
}
Listener {
IP 172.20.87.1
Port 9091
}
Cluster {
Node stat2 {
IP 172.20.87.2
Port 9091
}
Node stat3 {
IP 172.20.87.3
Port 9091
}
}
Log {
Severity info
File /app/log/ntpa.s1.log
}
########################## application jobs #########################
Notify ntpstat-summery {
InitialRun 1
Frequency 1440
Mail ntpa-op@innolan.dk
Subject NTP Analyzer stats daily run - stat 1
Sender ntpa@innolan.dk
Smtp 172.20.87.1
Port 25
}
Reading stat-bulk-1 {
Name stat1
InitialRun 0
FixedRun 1
Frequency 3
}
########################## ntp1.innolan.net ##########################
Server {
HostID 1
HostName ntp1.innolan.net
ConfigFile /app/conf/ntp.conf.ntp1
HostStats ntp1-host-stat {
Frequency stat1
}
HostIOStats ntp1-host-iostat {
Frequency stat1
}
PeerStats ntp1-peer-stat {
Frequency stat1
}
}
########################## ntp2.innolan.net ##########################
Server {
HostID 2
HostName ntp2.innolan.net
ConfigFile /app/conf/ntp.conf.ntp2
HostStats ntp2-host-stat {
Frequency stat1
}
HostIOStats ntp2-host-iostat {
Frequency stat1
}
PeerStats ntp2-peer-stat {
Frequency stat1
}
}
########################## ntp3.innolan.net ##########################
Server {
HostID 3
HostName ntp3.innolan.net
ConfigFile /app/conf/ntp.conf.ntp3
HostStats ntp3-host-stat {
Frequency stat1
}
HostIOStats ntp3-host-iostat {
Frequency stat1
}
PeerStats ntp3-peer-stat {
Frequency stat1
}
}

View File

@ -3,12 +3,13 @@
# $FreeBSD
#
# PROVIDE: ntpa
# REQUIRE: networking
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable ntpa:
# ntpa_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable munin-node
# ntpa_config (path): Set to "/usr/local/etc/ntpa/ntpa.conf" by default.
# Set it to "YES" to enable ntpa
# ntpa_config (file): Set to "/usr/local/etc/ntpa/ntpa.conf" by default.
# ntpa_tempdir (path): Set to "/tmp/" by default.
#
# Run additional instances of ntpa with:
@ -30,28 +31,28 @@ MONO="/usr/local/bin/mono"
ntpa_start()
{
if [ -f ${pidfile} ]; then
rc_pid=`cat ${pidfile}`
echo 1>&2 "${name} already running? (pid=$rc_pid)."
return 1
else
echo "Starting ${name}."
cd /usr/local/ntpa/
${MONO} ntpa.exe --config ${config} --writepid ${pidfile} --temp ${tempdir} --daemon ${name} &
fi
if [ -f ${pidfile} ]; then
rc_pid=`cat ${pidfile}`
echo 1>&2 "${name} already running? (pid=$rc_pid)."
return 1
else
echo "Starting ${name}."
cd /usr/local/ntpa/
${MONO} ntpa.exe --config ${config} --writepid ${pidfile} --temp ${tempdir} --daemon ${name} &
fi
}
ntpa_stop()
{
if [ ! -f ${pidfile} ]; then
_run_rc_notrunning
return 1
else
echo "Stopping ${name}."
rc_pid=`cat ${pidfile}`
kill -TERM $rc_pid
wait_for_pids ${rc_pid}
fi
if [ ! -f ${pidfile} ]; then
_run_rc_notrunning
return 1
else
echo "Stopping ${name}."
rc_pid=`cat ${pidfile}`
kill -TERM $rc_pid
wait_for_pids ${rc_pid}
fi
}
eval ": \${${name}_enable:=\"NO\"}"