From 7dcbe396171975370b111f7990e330e15b658102 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 26 Oct 2007 08:22:01 +0000 Subject: [PATCH] Fix some mdoc issues. Taken-from: FreeBSD --- lib/libc/gen/sysctl.3 | 18 +++++++------ share/man/man4/coretemp.4 | 4 +-- share/man/man4/it.4 | 8 +++--- share/man/man4/lm.4 | 6 ++--- share/man/man9/sensor_attach.9 | 33 +++++++++++++----------- usr.sbin/sensorsd/sensorsd.8 | 12 ++++----- usr.sbin/sensorsd/sensorsd.conf.5 | 54 ++++++++++++++++++++++----------------- 7 files changed, 74 insertions(+), 61 deletions(-) diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 84a4c3823e..a1ad172f4b 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -31,7 +31,7 @@ .\" .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD: src/lib/libc/gen/sysctl.3,v 1.33.2.13 2002/04/07 04:57:14 dd Exp $ -.\" $DragonFly: src/lib/libc/gen/sysctl.3,v 1.8 2007/10/03 20:06:54 swildner Exp $ +.\" $DragonFly: src/lib/libc/gen/sysctl.3,v 1.9 2007/10/26 08:22:00 swildner Exp $ .\" .Dd January 23, 2001 .Dt SYSCTL 3 @@ -311,29 +311,31 @@ The machine dependent architecture type. .\".It Fa HW_DISKSTATS .It Li HW_SENSORS Third level comprises an array of -.Li struct sensordev +.Vt "struct sensordev" structures containing information about devices that may attach hardware monitoring sensors. .Pp Third, fourth and fifth levels together comprise an array of -.Li struct sensor +.Vt "struct sensor" structures containing snapshot readings of hardware monitoring sensors. In such usage, third level indicates the numerical representation of the sensor device name to which the sensor is attached -(device's xname and number shall be matched with the help of -.Li struct sensordev +(device's +.Va xname +and number shall be matched with the help of +.Vt "struct sensordev" structure above), fourth level indicates sensor type and fifth level is an ordinal sensor number (unique to the specified sensor type on the specified sensor device). .Pp The -.Sy sensordev +.Vt sensordev and -.Sy sensor +.Vt sensor structures and -.Sy sensor_type +.Vt sensor_type enumeration are defined in .In sys/sensors.h . diff --git a/share/man/man4/coretemp.4 b/share/man/man4/coretemp.4 index be9c8f43bd..d140cfe01f 100644 --- a/share/man/man4/coretemp.4 +++ b/share/man/man4/coretemp.4 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man4/coretemp.4,v 1.1 2007/08/23 20:05:09 des Exp $ -.\" $DragonFly: src/share/man/man4/coretemp.4,v 1.1 2007/10/02 13:16:42 hasso Exp $ +.\" $DragonFly: src/share/man/man4/coretemp.4,v 1.2 2007/10/26 08:22:00 swildner Exp $ .\" .Dd September 13, 2007 .Dt CORETEMP 4 @@ -52,7 +52,7 @@ The driver provides support for the on-die digital thermal sensor present in Intel Core and newer CPUs. The values are exposed through the -.Va HW_SENSORS +.Dv HW_SENSORS .Xr sysctl 3 tree. For example: diff --git a/share/man/man4/it.4 b/share/man/man4/it.4 index 3ee0ce35a7..d15470bd2c 100644 --- a/share/man/man4/it.4 +++ b/share/man/man4/it.4 @@ -1,5 +1,5 @@ .\" $OpenBSD: it.4,v 1.8 2006/09/08 15:09:14 jmc Exp $ -.\" $DragonFly: src/share/man/man4/it.4,v 1.3 2007/10/03 20:06:54 swildner Exp $ +.\" $DragonFly: src/share/man/man4/it.4,v 1.4 2007/10/26 08:22:00 swildner Exp $ .\" .\" Copyright (c) 2003 Julien Bordet .\" All rights reserved. @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm it -.Nd ITE IT8705F/12F/16F and SiS SiS950 Super I/O Hardware Monitor +.Nd "ITE IT8705F/12F/16F and SiS SiS950 Super I/O Hardware Monitor" .Sh SYNOPSIS .Cd "device it0 at isa? port 0x290" .Cd "device it1 at isa? port 0xc00" @@ -43,12 +43,12 @@ and .Tn SiS950 hardware monitors. The values are exposed through the -.Va HW_SENSORS +.Dv HW_SENSORS .Xr sysctl 3 interface. .Pp Most supported devices possess 15 sensors: -.Bl -column "Sensor" "Units" "Typical" -offset indent +.Bl -column ".Sy Sensor" ".Sy Units" ".Sy Typical" -offset indent .It Sy "Sensor" Ta Sy "Units" Ta Sy "Typical Use" .It Li "Fan0" Ta "RPM" Ta "CPU Fan" .It Li "Fan1" Ta "RPM" Ta "Fan" diff --git a/share/man/man4/lm.4 b/share/man/man4/lm.4 index 32591eeb7a..45874b8d81 100644 --- a/share/man/man4/lm.4 +++ b/share/man/man4/lm.4 @@ -1,6 +1,6 @@ .\" $OpenBSD: lm.4,v 1.16 2007/05/26 22:38:55 cnst Exp $ .\" $NetBSD: lm.4,v 1.11 2001/09/22 01:22:49 wiz Exp $ -.\" $DragonFly: src/share/man/man4/lm.4,v 1.4 2007/10/05 18:34:47 swildner Exp $ +.\" $DragonFly: src/share/man/man4/lm.4,v 1.5 2007/10/26 08:22:00 swildner Exp $ .\" .\" Copyright (c) 2000 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -41,7 +41,7 @@ .Os .Sh NAME .Nm lm -.Nd NatSemi LM78/79/81 and Winbond Super I/O Hardware Monitor +.Nd "NatSemi LM78/79/81 and Winbond Super I/O Hardware Monitor" .Sh SYNOPSIS .Cd "device lm0 at isa? port 0x290" .Cd "device lm1 at isa? port 0x280" @@ -56,7 +56,7 @@ LM 78/79/81 and Super I/O hardware monitors, and registers compatible chips under the -.Va HW_SENSORS +.Dv HW_SENSORS .Xr sysctl 3 tree. .Sh HARDWARE diff --git a/share/man/man9/sensor_attach.9 b/share/man/man9/sensor_attach.9 index 7a6556f4ff..50b0a2e7e5 100644 --- a/share/man/man9/sensor_attach.9 +++ b/share/man/man9/sensor_attach.9 @@ -1,5 +1,5 @@ .\" $OpenBSD: sensor_attach.9,v 1.4 2007/03/22 16:55:31 deraadt Exp $ -.\" $DragonFly: src/share/man/man9/sensor_attach.9,v 1.2 2007/10/03 20:06:54 swildner Exp $ +.\" $DragonFly: src/share/man/man9/sensor_attach.9,v 1.3 2007/10/26 08:22:00 swildner Exp $ .\" .\" Copyright (c) 2006 Michael Knudsen .\" Copyright (c) 2006 Constantine A. Murenin @@ -42,12 +42,10 @@ .Fn "sensordev_install" "struct ksensordev *sensdev" .Ft void .Fn "sensordev_deinstall" "struct ksensordev *sensdev" -.Pp .Ft void .Fn "sensor_attach" "struct ksensordev *sensdev" "struct ksensor *sens" .Ft void .Fn "sensor_detach" "struct ksensordev *sensdev" "struct ksensor *sens" -.Pp .Ft int .Fn "sensor_task_register" "void *arg" "void (*func)(void *)" "int period" .Ft void @@ -61,23 +59,27 @@ that are available under the .Xr sysctl 8 tree. .Pp +The .Fn sensor_attach -adds the sensor specified by the -.Pa sens +function adds the sensor specified by the +.Fa sens argument to the sensor device specified by the -.Pa sensdev +.Fa sensdev argument. +The .Fn sensor_detach -can be used to remove sensors previously added by +function can be used to remove sensors previously added by .Fn sensor_attach . .Pp +The .Fn sensordev_install -registers the sensor device specified by the -.Pa sensdev +function registers the sensor device specified by the +.Fa sensdev argument so that all sensors that are attached to the device become accessible via the sysctl interface. +The .Fn sensordev_deinstall -can be used to remove sensor devices previously registered by +function can be used to remove sensor devices previously registered by .Fn sensordev_install . .Pp Drivers are responsible for retrieving, interpreting and normalising @@ -85,8 +87,9 @@ sensor values and updating the sensor struct periodically. If the driver needs process context, for example to sleep, it can register a task with the sensor framework. .Pp +The .Fn sensor_task_register -is used to register a periodic task to update sensors. +function is used to register a periodic task to update sensors. The .Fa func argument is a pointer to the function to run with an interval of @@ -99,7 +102,7 @@ parameter is the argument given to the function. The .Fn sensor_task_unregister -removes all tasks previously registered with +function removes all tasks previously registered with .Fn sensor_task_register with an argument of .Fa arg . @@ -118,7 +121,7 @@ are not compatible with includes an implementation that is similar and compatible with an earlier version of these -.Va sensor_task +.Fn sensor_task functions that was available from .Ox 3.9 until @@ -126,8 +129,8 @@ until .Pp Drivers that only call .Fn sensor_task_register -and don't check its return value are not affected by this -.Va sensor_task +and do not check its return value are not affected by this +.Fn sensor_task compatibility notice. .Sh SEE ALSO .Xr systat 1 , diff --git a/usr.sbin/sensorsd/sensorsd.8 b/usr.sbin/sensorsd/sensorsd.8 index 5dc92ad26b..b2366ba65f 100644 --- a/usr.sbin/sensorsd/sensorsd.8 +++ b/usr.sbin/sensorsd/sensorsd.8 @@ -1,5 +1,5 @@ .\" $OpenBSD: sensorsd.8,v 1.16 2007/08/11 20:45:35 cnst Exp $ -.\" $DragonFly: src/usr.sbin/sensorsd/sensorsd.8,v 1.2 2007/10/03 20:06:54 swildner Exp $ +.\" $DragonFly: src/usr.sbin/sensorsd/sensorsd.8,v 1.3 2007/10/26 08:22:01 swildner Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" Copyright (c) 2005 Matthew Gream @@ -22,7 +22,7 @@ .Os .Sh NAME .Nm sensorsd -.Nd hardware sensors monitor +.Nd "hardware sensors monitor" .Sh SYNOPSIS .Nm .Op Fl d @@ -57,7 +57,7 @@ This file is reloaded upon receiving .Dv SIGHUP . .Pp The options are as follows: -.Bl -tag -width Ds +.Bl -tag -width indent .It Fl d Do not daemonize. If this option is specified, @@ -65,8 +65,8 @@ If this option is specified, will run in the foreground. .El .Sh FILES -.Bl -tag -width "/etc/sensorsd.conf" -.It /etc/sensorsd.conf +.Bl -tag -width ".Pa /etc/sensorsd.conf" +.It Pa /etc/sensorsd.conf Configuration file for .Nm . .El @@ -87,7 +87,7 @@ To guard against false reports, implements a state dumping mechanism. However, this inevitably introduces an additional delay in status reporting and command execution, -e.g. one may notice that +e.g.\& one may notice that .Nm makes its initial report about the state of monitored sensors not immediately, but either 1 or 2 minutes after it is being started up. diff --git a/usr.sbin/sensorsd/sensorsd.conf.5 b/usr.sbin/sensorsd/sensorsd.conf.5 index aab1b977dd..d7ea55fa1c 100644 --- a/usr.sbin/sensorsd/sensorsd.conf.5 +++ b/usr.sbin/sensorsd/sensorsd.conf.5 @@ -1,5 +1,5 @@ .\" $OpenBSD: sensorsd.conf.5,v 1.18 2007/08/14 17:10:02 cnst Exp $ -.\" $DragonFly: src/usr.sbin/sensorsd/sensorsd.conf.5,v 1.1 2007/10/02 12:57:01 hasso Exp $ +.\" $DragonFly: src/usr.sbin/sensorsd/sensorsd.conf.5,v 1.2 2007/10/26 08:22:01 swildner Exp $ .\" .\" Copyright (c) 2003 Henning Brauer .\" Copyright (c) 2005 Matthew Gream @@ -35,12 +35,13 @@ is matched by at most one entry in which may specify high and low limits, and whether sensor status changes provided by the driver should be ignored. If the limits are crossed or if the status provided by the driver changes, -.Xr sensorsd 8 's +.Xr sensorsd 8 Ap s alert functionality is triggered and a command, if specified, is executed. .Pp +The .Nm -follows the syntax of configuration databases as documented in +file follows the syntax of configuration databases as documented in .Xr getcap 3 . Sensors may be specified by their full .Va hw.sensors @@ -48,14 +49,14 @@ Sensors may be specified by their full variable name or by type, with the full name taking precedence. For example, if an entry -.Dq hw.sensors.lm0.temp1 +.Va hw.sensors.lm0.temp1 is not found, then an entry for -.Dq temp +.Dq Li temp will instead be looked for. .Pp The following attributes may be used: .Pp -.Bl -tag -width "commandXX" -offset indent -compact +.Bl -tag -width ".Li command" -offset indent -compact .It Li command Specify a command to be executed on state change. .It Li high @@ -85,24 +86,26 @@ and simply trigger on status transitions. If boundaries are specified nonetheless, then they are used in addition to automatic status monitoring, unless the -.Dq istatus +.Dq Li istatus attribute is specified to ignore status values that are provided by the drivers. .Pp The command is executed when there is any change in sensor state. Tokens in the command are substituted as follows: .Pp -.Bl -tag -width Ds -offset indent -compact -.It %x -the xname of the device the sensor sits on -.It %t +.Bl -tag -width indent -offset indent -compact +.It Li %x +the +.Va xname +of the device the sensor sits on +.It Li %t the type of sensor -.It %n +.It Li %n the sensor number -.It %2 +.It Li %2 the sensor's current value -.It %3 +.It Li %3 the sensor's low limit -.It %4 +.It Li %4 the sensor's high limit .El .Pp @@ -110,19 +113,21 @@ By default, .Xr sensorsd 8 monitors status changes on all sensors that keep their state. This behaviour may be altered by using the -.Dq istatus +.Dq Li istatus attribute to ignore status changes of sensors of a certain type or individual sensors. .Sh FILES -.Bl -tag -width "/etc/sensorsd.conf" -.It /etc/sensorsd.conf +.Bl -tag -width ".Pa /etc/sensorsd.conf" +.It Pa /etc/sensorsd.conf Configuration file for .Xr sensorsd 8 . .El .Sh EXAMPLES In the following configuration file, -if hw.sensors.ipmi0.temp0 transitions 80C or +if +.Va hw.sensors.ipmi0.temp0 +transitions 80C or if its status as provided by .Xr ipmi 4 changes, the command @@ -130,13 +135,16 @@ changes, the command will be executed, with the sensor type, number and current value passed to it. Alerts will be sent -if hw.sensors.lm0.volt3 transitions to being within or outside +if +.Va hw.sensors.lm0.volt3 +transitions to being within or outside a range of 4.8V and 5.2V; -if the speed of the fan attached to hw.sensors.lm0.fan1 +if the speed of the fan attached to +.Va hw.sensors.lm0.fan1 transitions to being below or above 1000RPM; if any RAID volume drive changes its status from, for example, -.Dq OK , +.Dq Li OK , such as in the case of drive failure, rebuild, or a complete failure, the command .Pa /etc/sensorsd/drive @@ -169,7 +177,7 @@ The format was altered in .Ox 4.1 to accommodate hierarchical device-based sensor addressing. The -.Dq istatus +.Dq Li istatus attribute was introduced in .Ox 4.2 . .Sh CAVEATS -- 2.11.4.GIT