'\" t .\" Title: ntpshmmon .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 21 Dec 2018 .\" Manual: GPSD Documentation .\" Source: The GPSD Project .\" Language: English .\" .TH "NTPSHMMON" "1" "21 Dec 2018" "The GPSD Project" "GPSD Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ntpshmmon \- capture samples from gpsd or other ntpd refclock sources .SH "SYNOPSIS" .HP \w'\fBntpshmmon\fR\ 'u \fBntpshmmon\fR [\-?] [\-h] [\-n\ \fInsamples\fR] [\-o] [\-s] [\-t\ \fInseconds\fR] [\-v] [\-V] .SH "DESCRIPTION" .PP This program monitors the shared\-memory segments updated by \fBgpsd\fR(8) , and possibly other refclock sources, as a way of communicating with ntpd, the Network Time Protocol daemon\&. It reads these in exactly the way an ntpd instance does\&. It can be run concurrently with ntpd without interfering with ntpd\*(Aqs normal operation\&. .PP 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\&. .PP Here is an example of the beginning of a report file: .sp .if n \{\ .RS 4 .\} .nf 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 .fi .if n \{\ .RE .\} .PP 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\&. .PP The remainder of the file is either commments or sample lines\&. A comment line begins with a # and should ignored by programs that interpret this format\&. .PP 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 .PP 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\&. .PP If the \-o option is used, the "Seen@" column is replaced with the "Offset" column\&. The "Offset" is the difference between "Clock" and "Real" times\&. .SH "OPTIONS" .PP \-? .RS 4 Display program usage and exit\&. .RE .PP \-h .RS 4 Display program usage and exit\&. .RE .PP \-n .RS 4 Set maximum number of samples to collect\&. .RE .PP \-o .RS 4 Replace the "Seen@" column with the "Offset" column\&. The "Offset" is the difference between "Clock" and "Real" times\&. .RE .PP \-s .RS 4 Remove all SHM segments used by GPSD\&. This option will normally only be of interest to GPSD developers\&. .RE .PP \-t .RS 4 Set maximum time to collect samples in seconds\&. .RE .PP \-v .RS 4 Enable verbose status messages\&. .RE .PP \-V .RS 4 Display program version and exit\&. .RE .SH "SEE ALSO" .PP \fBgpsd\fR(8), \fBgpsdctl\fR(8), \fBgps\fR(1), \fBlibgps\fR(3), \fBlibgpsmm\fR(3), \fBgpsprof\fR(1), \fBgpsfake\fR(1)\&. .SH "AUTHOR" .PP Eric S\&. Raymond \&.