summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-01-10 22:54:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-01-10 22:54:13 +0000
commit88d5a9850924c40640403be488d99c75e12237e0 (patch)
treea9e08e3841edb28bb2a851da7a139fdc71a739bf
parentfab2e505326dbaabdf7cb2b62ac77ab6df31ca75 (diff)
improve ntpctl usage so that the manual page does not need to be read
every time ok jmc
-rw-r--r--usr.sbin/ntpd/ntpctl.819
-rw-r--r--usr.sbin/ntpd/ntpd.c4
2 files changed, 9 insertions, 14 deletions
diff --git a/usr.sbin/ntpd/ntpctl.8 b/usr.sbin/ntpd/ntpctl.8
index 37a63ef9aa5..cdb98dccd1a 100644
--- a/usr.sbin/ntpd/ntpctl.8
+++ b/usr.sbin/ntpd/ntpctl.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ntpctl.8,v 1.4 2013/10/16 21:23:59 jmc Exp $
+.\" $OpenBSD: ntpctl.8,v 1.5 2014/01/10 22:54:12 deraadt Exp $
.\"
.\" Copyright (c) 2012 Mike Miller <mmiller@mgm51.com>
.\"
@@ -14,7 +14,7 @@
.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: October 16 2013 $
+.Dd $Mdocdate: January 10 2014 $
.Dt NTPCTL 8
.Os
.Sh NAME
@@ -22,7 +22,7 @@
.Nd control the Network Time Protocol daemon
.Sh SYNOPSIS
.Nm ntpctl
-.Op Fl s Ar modifier
+.Op Fl s Cm all | peers | sensors | status
.Sh DESCRIPTION
The
.Nm
@@ -32,25 +32,21 @@ daemon.
.Pp
The options are as follows:
.Bl -tag -width "-s modifierX"
-.It Fl s Ar modifier
-Show the data specified by
-.Ar modifier :
-.Bl -tag -width "sensorsXXX"
-.It Cm all
+.It Fl s Cm all
Show all data.
-.It Cm peers
+.It Fl s Cm peers
Show the following information about each peer: weight, trustlevel,
stratum, number of seconds until the next poll, polling interval
in seconds, and offset, network delay and network jitter in milliseconds.
When the system clock is synced to a peer, an asterisk
is displayed to the left of the weight column for that peer.
-.It Cm sensors
+.It Fl s Cm sensors
Show the following information about each sensor: weight, sensor "good"
status, stratum, and offset and the configured correction in
milliseconds.
When the system clock is synced to a sensor, an asterisk
is displayed to the left of the weight column for that sensor.
-.It Cm status
+.It Fl s Cm status
Show the status of peers and sensors, and whether the system clock is synced.
When the system clock is synced, the stratum is displayed.
When the system clock is not synced, the offset of the system clock,
@@ -58,7 +54,6 @@ as reported by the
.Xr adjtime 2
system call, is displayed.
.El
-.El
.Sh FILES
.Bl -tag -width "/var/run/ntpd.sockXXX" -compact
.It Pa /var/run/ntpd.sock
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c
index 53433c556b4..62c4b721da8 100644
--- a/usr.sbin/ntpd/ntpd.c
+++ b/usr.sbin/ntpd/ntpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.c,v 1.75 2013/11/13 20:44:39 benno Exp $ */
+/* $OpenBSD: ntpd.c,v 1.76 2014/01/10 22:54:12 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -81,7 +81,7 @@ usage(void)
extern char *__progname;
if (strcmp(__progname, "ntpctl") == 0)
- fprintf(stderr, "usage: ntpctl [-s modifier]\n");
+ fprintf(stderr, "usage: ntpctl [-s all | peers | sensors | status]\n");
else
fprintf(stderr, "usage: %s [-dnSsv] [-f file]\n",
__progname);