'\" t .\" Title: ntpshmmon .\" Author: Eric S. Raymond .\" Generator: Asciidoctor 2.0.18 .\" Date: 2023-01-10 .\" Manual: GPSD Documentation .\" Source: GPSD, Version 3.25 .\" Language: English .\" .TH "NTPSHMMON" "1" "2023-01-10" "GPSD, Version 3.25" "GPSD Documentation" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" ntpshmmon \- capture samples from gpsd or other ntpd refclock sources .SH "SYNOPSIS" .sp \fBntpshmmon\fP [OPTIONS] .sp \fBntpshmmon\fP \-h .sp \fBntpshmmon\fP \-V .SH "DESCRIPTION" .sp This program monitors the shared\-memory segments updated by gpsd 8 , and possibly other refclock sources, as a way of communicating with \fBntpd\fP, the Network Time Protocol daemon. It reads these in exactly the way an \fBntpd\fP instance does. It can be run concurrently with \fBntpd\fP without interfering with \fBntpd\fP\*(Aqs normal operation. .sp \fBntpshmmon\fP requires root privileges to access the root only NTP0 and NTP1. Running as a normal user will only allow access to NTP2 and NTP3. cause loss of functionality. .sp This program runs forever, or until a termination option is matched, or until interrupted, generating sample reports to standard output. Each line consists of whitespace\-separated textual fields. .sp Here is an example of the beginning of a report file: .sp .if n .RS 4 .nf .fam C ntpshmmon version 3.18 # Name Seen@ Clock Real L Pre sample NTP2 1424926256.443030206 1424926256.115869233 1424926256.000000000 0 \-1 sample NTP3 1424926256.443060517 1424926255.995430821 1424926256.000000000 0 \-20 sample NTP3 1424926256.995747347 1424926256.995422728 1424926257.000000000 0 \-20 sample NTP2 1424926257.112433572 1424926257.111936726 1424926257.000000000 0 \-1 sample NTP3 1424926257.996221153 1424926257.995410232 1424926258.000000000 0 \-20 sample NTP2 1424926258.107769409 1424926258.107451006 1424926258.000000000 0 \-1 sample NTP3 1424926258.995647636 1424926258.995406476 1424926259.000000000 0 \-20 .fam .fi .if n .RE .sp The output always begins with a header line expressing the version of the output format; the version line begins with "ntpshmmon version" and is followed by a numeric version field. .sp The remainder of the file is either comments or sample lines. A comment line begins with a # and should be ignored by programs that interpret this format. .sp The fields of a sample line are as follows: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ . sp -1 . IP " 1." 4.2 .\} The keyword "sample" .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ . sp -1 . IP " 2." 4.2 .\} The NTP unit from which it was collected. .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ . sp -1 . IP " 3." 4.2 .\} Collection time of day, seconds. .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ . sp -1 . IP " 4." 4.2 .\} Receiver time of day, seconds. .RE .sp .RS 4 .ie n \{\ \h'-04' 5.\h'+01'\c .\} .el \{\ . sp -1 . IP " 5." 4.2 .\} Clock time of day, seconds. .RE .sp .RS 4 .ie n \{\ \h'-04' 6.\h'+01'\c .\} .el \{\ . sp -1 . IP " 6." 4.2 .\} Leap\-second notification status. .RE .sp .RS 4 .ie n \{\ \h'-04' 7.\h'+01'\c .\} .el \{\ . sp -1 . IP " 7." 4.2 .\} Source precision (log(2) of source jitter). .RE .sp In these fields, "clock time" is the high\-precision system clock time measured by the source and "receiver time" is from the receiver. Both times are in UTC. It is normal for the seconds part of receiver time to coincide with the seconds part of collection time and for the nanoseconds part of receiver time to be zero. .sp If the \fB\-o\fP option is used, the "Seen@" column is replaced with the "Offset" column. The "Offset" is the difference between "Clock" and "Real" times. .SH "OPTIONS" .sp \fB\-?\fP, \fB\-h\fP, \fB\-\-help\fP .RS 4 Display program usage and exit. .RE .sp \fB\-n COUNT\fP, \fB\-\-count COUNT\fP .RS 4 Set maximum number of samples to collect to COUNT. .RE .sp \fB\-o\fP, \fB\-\-offset\fP .RS 4 Replace the "Seen@" column with the "Offset" column. The "Offset" is the difference between "Clock" and "Real" times. .RE .sp \fB\-s\fP, \fB\-\-rmshm\fP .RS 4 Remove all SHM segments used by GPSD. This option will normally only be of interest to GPSD developers. .RE .sp \fB\-t SECONDS\fP, \fB\-\-seconds SECONDS\fP .RS 4 Set maximum time to collect samples in seconds to SECONDS. .RE .sp \fB\-v\fP, \fB\-\-verbose\fP .RS 4 Enable verbose status messages. .RE .sp \fB\-V\fP, \fB\-\-version\fP .RS 4 Display program version and exit. .RE .SH "RETURN VALUES" .sp \fB0\fP .RS 4 on success. .RE .sp \fB1\fP .RS 4 on failure .RE .SH "SEE ALSO" .sp \fBgpsd\fP(8), \fBgps\fP(1) .SH "RESOURCES" .sp \fBProject web site:\fP \c .URL "https://gpsd.io/" "" "" .SH "COPYING" .sp This file is Copyright 2013 by the GPSD project .br SPDX\-License\-Identifier: BSD\-2\-clause .SH "AUTHOR" .sp Eric S. Raymond