xref: /openbsd-src/share/man/man4/msts.4 (revision b50eeac5933cfe570147dba215849e615e0d62b8)
1*b50eeac5Sderaadt.\"	$OpenBSD: msts.4,v 1.4 2015/01/15 00:48:10 deraadt Exp $
297189cdcSmbalmer.\"
397189cdcSmbalmer.\" Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
497189cdcSmbalmer.\"
597189cdcSmbalmer.\" Permission to use, copy, modify, and distribute this software for any
697189cdcSmbalmer.\" purpose with or without fee is hereby granted, provided that the above
797189cdcSmbalmer.\" copyright notice and this permission notice appear in all copies.
897189cdcSmbalmer.\"
997189cdcSmbalmer.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1097189cdcSmbalmer.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1197189cdcSmbalmer.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1297189cdcSmbalmer.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1397189cdcSmbalmer.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1497189cdcSmbalmer.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1597189cdcSmbalmer.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1697189cdcSmbalmer.\"
17*b50eeac5Sderaadt.Dd $Mdocdate: January 15 2015 $
1897189cdcSmbalmer.Dt MSTS 4
1997189cdcSmbalmer.Os
2097189cdcSmbalmer.Sh NAME
2197189cdcSmbalmer.Nm msts
2297189cdcSmbalmer.Nd Meinberg Standard Time String timedelta sensor
2397189cdcSmbalmer.Sh SYNOPSIS
2497189cdcSmbalmer.Cd "pseudo-device msts" Op Ar count
2597189cdcSmbalmer.Sh DESCRIPTION
2697189cdcSmbalmerThis line discipline interfaces serial Meinberg devices.
2797189cdcSmbalmer.Pp
2897189cdcSmbalmerThe line discipline is enabled by the following sequence:
2997189cdcSmbalmer.Bd -literal -offset indent
30*b50eeac5Sderaadt#include <sys/ioctl.h>
3197189cdcSmbalmerint ldisc = MSTSDISC, fildes; ...
3297189cdcSmbalmerioctl(fildes, TIOCSETD, &ldisc);
3397189cdcSmbalmer.Ed
3497189cdcSmbalmer.Pp
3597189cdcSmbalmerThe byte stream is unaltered by the line discipline which
3697189cdcSmbalmermaintains a timedelta sensor using the MSTS data.
3797189cdcSmbalmerThe timedelta sensor will appear as msts* in the list of sensors and the delta
3897189cdcSmbalmer(in nanoseconds) between the received time information and the local time can
3997189cdcSmbalmerbe accessed through the
4097189cdcSmbalmer.Xr sysctl 8
4197189cdcSmbalmerinterface.
4297189cdcSmbalmer.Pp
4397189cdcSmbalmerThe Meinberg radio clocks use the following default baudrates:
4497189cdcSmbalmer.Pp
4597189cdcSmbalmer.Bl -tag -width "GPS-receivers (external and PCI, COM0)XXX" -offset indent -compact
4697189cdcSmbalmer.It GPS-receivers (external and PCI, COM0)
4797189cdcSmbalmer19200/8N1
4897189cdcSmbalmer.It GPS-receivers (external, COM1)
4997189cdcSmbalmer9600/8N1
5097189cdcSmbalmer.It DCF77-receivers (external)
5197189cdcSmbalmer9600/7E2
5297189cdcSmbalmer.It DCF77-receivers (PCI)
5397189cdcSmbalmer4800/8N1
5497189cdcSmbalmer.El
5597189cdcSmbalmer.Sh SENSOR STATES
5697189cdcSmbalmerThe quality of the timedelta is reported as the sensor status:
57542c088aSmbalmer.Bl -tag -width "CRITICALXX" -offset indent
5897189cdcSmbalmer.It OK
5997189cdcSmbalmerThe time information is valid.
6097189cdcSmbalmerThe timedelta is safe to use for applications like
6197189cdcSmbalmer.Xr ntpd 8 .
6297189cdcSmbalmer.It WARN
6397189cdcSmbalmerThe attached receiver has been indicating a warning condition
6497189cdcSmbalmerfor at least the last ten minutes.
6597189cdcSmbalmerThe timedelta should be used with care.
6697189cdcSmbalmer.It CRITICAL
6797189cdcSmbalmertty timestamping has been turned on but there is no PPS signal present or the
6897189cdcSmbalmerreceiver indicated a warning condition for at least the last twenty minutes.
6997189cdcSmbalmerCheck your hardware.
7097189cdcSmbalmerSome receiver units need PPS to be manually turned on.
7197189cdcSmbalmer.El
72542c088aSmbalmer.Pp
73542c088aSmbalmerThe status of a second sensor is used to report the status of the
74542c088aSmbalmerdevice itself:
75542c088aSmbalmer.Bl -tag -width "CRITICALXX" -offset indent
76542c088aSmbalmer.It OK
77542c088aSmbalmerThe clock is synchronized, e.g. a GPS receiver has a fix.
78542c088aSmbalmer.It WARN
79542c088aSmbalmerThe device issued a warning condition, e.g. a GPS receiver has no fix.
80542c088aSmbalmer.El
8197189cdcSmbalmer.Sh SEE ALSO
8297189cdcSmbalmer.Xr tty 4 ,
8397189cdcSmbalmer.Xr ldattach 8 ,
8497189cdcSmbalmer.Xr ntpd 8 ,
8597189cdcSmbalmer.Xr sysctl 8
8697189cdcSmbalmer.Sh HISTORY
8797189cdcSmbalmerThe
8897189cdcSmbalmer.Nm
8997189cdcSmbalmerinterface first appeared in
9097189cdcSmbalmer.Ox 4.3 .
9197189cdcSmbalmer.Sh AUTHORS
9297189cdcSmbalmerThe
9397189cdcSmbalmer.Nm
9497189cdcSmbalmerline discipline was written by
95e5cc2e7eSschwarze.An Marc Balmer Aq Mt mbalmer@openbsd.org .
96