'\" t
.\" Title: ntpshmmon
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1
.\" Date: 25 Jan 2015
.\" Manual: GPSD Documentation
.\" Source: The GPSD Project
.\" Language: English
.\"
.TH "NTPSHMMON" "1" "25 Jan 2015" "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 GPS or other ntpd refclock sources
.SH "SYNOPSIS"
.HP \w'\fBntpshmmon\fR\ 'u
\fBntpshmmon\fR [\-h] [\-n\ \fInsamples\fR] [\-s] [\-t\ \fIseconds\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 1
# Name Seen@ Clock Real L Prec
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\&. This program never generates such lines itself\&.
.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 time measured by the source and "receiver time" is Unix UTC time at the receiver\&. 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
\-v
.RS 4
Enable verbose status messages\&.
.RE
.PP
\-c
.RS 4
Device poll interval in fractional seconds \- defaults to 1\&.
.RE
.PP
\-n
.RS 4
Set maximum number of samples to collect\&.
.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
\-h
.RS 4
Display program usage and exit\&.
.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
\&.