table of contents
NTPVIZ(1) | NTPsec | NTPVIZ(1) |
NAME¶
ntpviz - make visualizations of offset, jitter, etc. from stats file data
SYNOPSIS¶
ntpviz [OPTIONS]
[-c | --clip]
[-D DLVL | --debug DLVL]
[-d LOGDIR[,LOGDIR]...]
[-e endtime]
[-g | --general]
[-h | --help]
[-n NAME | --name NAME]
[-N | --nice]
[-o OUTDIR | --outdir OUTDIR]
[-p DAYS | --period DAYS]
[-s STARTTIME | --starttime STARTTIME]
[-T TERMINAL | --terminal TERMINAL]
[-V | --version]
[-w SIZE | --width SIZE]
[--all-peer-jitters |
--all-peer-offsets |
--local-error |
--local-freq-temps |
--local-gps |
--local-jitter |
--local-offset |
--local-offset-histogram |
--local-offset-multiplot |
--local-stability |
--local-temps |
--peer-jitters=hosts |
--peer-offsets=hosts]
[@OPTIONFILE]
DESCRIPTION¶
ntpviz analyzes files in an NTP log directory and generates statistical plots from them. It can output either PNG images or the gnuplot programs to generate them to standard output. In its default mode it generates an HTML directory containing an index page and either (a) all plots, for a single statfiles directory, or (b) a subset of comparative plots for multiple directories.
Basic Options¶
-c or --clip
-d LOGDIR[,LOGDIR]... or --datadir LOGDIR[,LOGDIR]...
-D DLVL or --debug DLVL
0 is the default, quiet except for all ERRORs and some WARNINGs.
1 shows some environment info and basic program progress.
2 leaves the plot file in the system temp directory.
9 is painfully verbose. 9 also includes profile data.
-e TIME or --endtime TIME
The default end time is the last logfile entry timestamp.
The default start time is computed as the end time minus DAYS.
Alternatively, you may specify either -s or -e (but not both) and use -p to set the plot period in days.
-g or --generate
-n STR or --name STR
-N or --nice
-o OUTDIR or --outdir OUTDIR
-p DAYS or --period DAYS
-s TIME or --starttime TIME
-T TERMINAL or --terminal TERMINAL
-V or --version
-w SIZE or --width SIZE
Individual Plots¶
The plot options choose what graph is generated; invoke only one. By default, the gnuplot for the graph is reported; with -g you get the rendered PNG.
The following plots are available:
--all-peer-jitters
--all-peer-offsets
--local-error
--local-freq-temps
--local-jitter
--local-gps
--local-offset
--local-offset-histogram
--local-offset-multiplot
--local-temps
--local-stability
--peer-jitters=host1[,host2...]
--peer-offsets=host1[,host2...]
If no individual plot is specified, all plots and an index HTML page are generated into the output directory.
When an index is generated, ntpviz will look for a header and footer file in the output directory. Neither of these files are required. These files may contain arbitrary HTML.
The header file will be added almost at the top of the body of the generated index page, and the footer file will be added almost at the bottom of the body of the generated index page.
The contents are at the discretion of the operator. One might put links to other related web pages, or notes on the server OS, software versions, hardware configuration, etc. into either of these files, as desired.
The code includes various sanity checks and will bail out with a message to standard error on, for example, missing logfile data required for a plot.
Argument File¶
Any command line options may also be placed into a command file. The command file name (OPTIONFILE) is prefixed on the command line with an atsign (@).
Each line in the command file should contain just one option. Multiple options per line are allowed but discouraged. Blank lines are allowed.
Comments may be added prepended with an octothorpe (#). Comments may appear on a new line, or trailing, after the # .
When an option takes a parameter, the option and parameter must be separated by an equal sign (=) or spaces.
These two ways to invoke ntpviz are equivalent:
$ ntpviz --period 1 --outdir day
$ cat day/config --period=1 --outdir=day $ ntpviz @day/config
REQUIREMENTS¶
Python and gnuplot. The plots will look better with the liberation font package installed.
AUTHORS¶
Eric S. Raymond, Gary E. Miller, and Daniel Drown. The gnuplot in this package is largely based on templates in Daniel Drown’s chrony-graph project: https://github.com/ddrown/chrony-graph/tree/ntpd
EXIT STATUS¶
One of the following exit values will be returned:
0
1
2
04/17/2024 | NTPsec 1.2.3 |