Commit Graph

85 Commits

Author SHA1 Message Date
Warner Losh
b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Kirk McKusick
f126d34981 Add -F option to sysctl(8) to display sysctl format.
Also add a test to ensure that it is working correctly.

Submitted by: ota_j.email.ne.jp
Reviewed by:  mckusick
Differential Revision: https://reviews.freebsd.org/D34012
2022-12-24 22:59:00 -08:00
Ceri Davies
cd9cdd0eaa sysctl.8: grammar nit 2022-12-13 19:52:10 +00:00
Mateusz Piotrowski
0438e9beb5 sysctl.8: Reference sysctl(9)
MFC after:	1 week
2022-06-30 16:22:01 +02:00
Colin Percival
1dee7c74d1 sysctl(8): Mention CTLFLAG_SKIP
`sysctl -a` does not print values with this flag.

Reviewed by:	debdrup
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34615
2022-03-20 11:30:43 -07:00
Stefan Eßer
77b793c465 Update man-pages to describe the user.localbase variable added in r367179.
MFC after:	3 days
2020-10-30 19:37:53 +00:00
Fernando Apesteguía
0ad4bfaef1 sysctl(8): clarify -n flag
-n omits the name of the variable regardless of the type of information that is
requested. Rephrase to clarify this point.

PR:	242191
Submitted by:	stilezy@gmail.com
Approved by:	emaste@
Differential Revision:	https://reviews.freebsd.org/D26149
2020-08-22 11:59:14 +00:00
Guangyuan Yang
c68d0f8b3d Remove -R option which was added to sysctl(8) man page per r244106, but it is not implemented.
MFC after:	3 days
Submitted by:	Alfonso Siciliano <alfix86@gmail.com>
Reviewed by:	0mp, imp
Differential Revision: 	https://reviews.freebsd.org/D19012
2019-02-09 04:36:02 +00:00
Mateusz Piotrowski
8251b8b87e sysctl(8): Add a standard exit status section.
Reviewed by:	bcr
Approved by:	re (gjb), krion (mentor)
Differential Revision:	https://reviews.freebsd.org/D17147
2018-09-24 20:46:45 +00:00
John Baldwin
2365fe5616 Permit sysctl(8) to set an array of numeric values for a single node.
Most sysctl nodes only return a single value, but some nodes return an
array of values (e.g. kern.cp_time).  sysctl(8) understand how to display
the values of a node that returns multiple values (it prints out each
numeric value separated by spaces).  However, until now sysctl(8) has
only been able to set sysctl nodes to a single value.  This change
allows sysctl to accept a new value for a numeric sysctl node that contains
multiple values separated by either spaces or commas.  sysctl(8) parses
this list into an array of values and passes the array as the "new" value
to sysctl(2).

Reviewed by:	rpokala
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D14569
2018-03-09 23:37:19 +00:00
Allan Jude
ed007b78d7 kern.osreldate is an integer, not a string
PR:		217501
Submitted by:	Yavuz Tanriverdi <stemix@gmail.com>
MFC after:	1 week
2017-09-16 16:23:00 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Marcelo Araujo
8020192d7b Add -t option to display field types.
PR:		bin/203918
Submitted by:	ota <ota@j.email.ne.jp>
Reviewed by:	cem
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D4451
2015-12-10 02:11:42 +00:00
John-Mark Gurney
7582000531 add support for specifying an initial buffer size when fetching a
sysctl... This is useful for kern.arandom which (without -B) will
happily return 0 bytes, which isn't too useful or random...

fix spelling (thanks igor!) of settable while I'm here...
2015-02-13 01:20:37 +00:00
Devin Teske
b85e9d27f6 Fix a typo: s/wriable/writable/ 2013-11-12 17:44:29 +00:00
Xin LI
da178c777f Teach sysctl(8) about parsing a file (while I'm there also give it
capability of parsing both = and : formats).

Submitted by:	hrs (initial version, bugs are mine)
MFC after:	3 months
2012-12-13 23:32:47 +00:00
Alfred Perlstein
9ecd2e32cd Allow sysctl to filter boot and runtime tunables.
Add the following flags to sysctl:
 -W  - show only writable sysctls
 -T  - show only tuneable sysctls

This can be used to create a /var/run/sysctl.boot to
compare set tunables versus booted tunables.

Sponsored by: iXsystems
2012-12-11 01:28:06 +00:00
Joel Dahl
c2965cd185 mdoc: terminate quoted strings.
Reviewed by:	brueffer
2012-03-26 15:18:14 +00:00
Matthew D Fleming
7e265faeb9 Fix typo and bump date. 2011-01-17 23:43:03 +00:00
Matthew D Fleming
5bf6a94016 The kernel is not exporting any "T,dev_t" sysctl nodes anymore, so
remove the capability and mention from sysctl(8).
2011-01-17 23:36:53 +00:00
Gavin Atkinson
7402a88ded Add the -i option to the synopsis.
Submitted by:	dhw
MFC after:	1 week (with r203310)
2010-02-06 13:39:08 +00:00
Gavin Atkinson
24b2aa3259 Implement the "-i" option to sysctl(8), to ignore failures while
retrieving individual OIDs.  This allows the same list of OIDs to be
passed to sysctl(8) across different systems where particular OIDs may not
exist, and still get as much information as possible from them.

PR:		bin/123644
Submitted by:	dhw
Approved by:	ed (mentor)
MFC after:	2 weeks
2010-01-31 19:33:25 +00:00
Remko Lodder
169575e183 Remove mentionings of kern.dumpdev which is no longer available.
PR:		docs/113570
Submitted by:	lawrance
MFC After:	3 days (where applicable)
2007-11-28 14:48:30 +00:00
Alexander Leidinger
9f05d312b3 Backout sensors framework.
Requested by:	phk
Discussed on:	cvs-all
2007-10-15 20:00:24 +00:00
Alexander Leidinger
99f6b270e3 Import OpenBSD's sysctl hardware sensors framework.
This commit includes the following core components:

 * sample configuration file for sensorsd
 * rc(8) script and glue code for sensorsd(8)
 * sysctl(3) doc fixes for CTL_HW tree
 * sysctl(3) documentation for hardware sensors
 * sysctl(8) documentation for hardware sensors
 * support for the sensor structure for sysctl(8)
 * rc.conf(5) documentation for starting sensorsd(8)
 * sensor_attach(9) et al documentation
 * /sys/kern/kern_sensors.c
   o sensor_attach(9) API for drivers to register ksensors
   o sensor_task_register(9) API for the update task
   o sysctl(3) glue code
   o hw.sensors shadow tree for sysctl(8) internal magic
 * <sys/sensors.h>
 * HW_SENSORS definition for <sys/sysctl.h>
 * sensors display for systat(1), including documentation
 * sensorsd(8) and all applicable documentation

The userland part of the framework is entirely source-code
compatible with OpenBSD 4.1, 4.2 and  -current as of today.

All sensor readings can be viewed with `sysctl hw.sensors`,
monitored in semi-realtime with `systat -sensors` and also
logged with `sensorsd`.

Submitted by:	Constantine A. Murenin <cnst@FreeBSD.org>
Sponsored by:	Google Summer of Code 2007 (GSoC2007/cnst-sensors)
Mentored by:	syrinx
Tested by:	many
OKed by:	kensmith
Obtained from:	OpenBSD (parts)
2007-10-14 10:45:31 +00:00
Daniel Gerzo
046bcd1bcf document hw.realmem
Submitted by:	cnst@ (Constantine A. Murenin)
Sponsored by:	Google Summer of Code 2007
Approved by:	re@ (bmah)
MFC after:	1 week
2007-08-24 20:38:09 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Robert Watson
f93d36fd92 Add "-q" argument to sysctl(8), which suppresses a limited set of warnings/
errors generated.  In particular, it suppresses "unknown oid" when
attempting to get or set a sysctl not present in the kernel.

MFC after:	1 week
2005-09-15 16:08:04 +00:00
Christian Brueffer
f0ea72a038 - Remove MLINKS to nonexistant manpages
- Change some section numbers to match reality
- For MLINKS to manpages from ports, mention which port installs them

MFC after:	3 days
2005-07-14 20:29:08 +00:00
Ruslan Ermilov
6087df9e8b Sort sections. 2005-01-18 10:09:38 +00:00
Ruslan Ermilov
214144704b Scheduled mdoc(7) sweep. 2005-01-10 16:17:34 +00:00
Hiten Pandya
ec3724d9d0 Code for automatic name completion in a tcsh(1) environment.
PR:		docs/44435
Submitted by:	Slaven Rezic slaven dot rezic at berlin dot de
2004-12-05 23:44:52 +00:00
Mark Murray
4c723140a4 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
Dag-Erling Smørgrav
7434ec74a8 Alphabetization braino.
Pointed out by:	johan
2003-11-07 21:28:29 +00:00
Dag-Erling Smørgrav
45817aaa9c Add a command-line option to format output for human readability.
Currently, the only effect it has is to print some (but not all) numbers
using thousands separators.
2003-11-07 16:33:45 +00:00
Ruslan Ermilov
fe08efe680 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
Philippe Charnier
4f898f942d .Nm -> .Xr 2003-06-08 12:57:39 +00:00
Christian Brueffer
ab5e6ef004 Clarify setting sysctl variables via loader(8) tunables
* s/can not/cannot/

Submitted by:	ru (*)
Approved by:	re (rwatson)
2003-05-18 00:27:02 +00:00
Christian Brueffer
433087977a Add information about setting sysctl variables via loader(8) and
loader.conf(5)

PR:		38426 (slightly modified)
Submitted by:	Phil Pennock <pdp@nl.demon.net>
Approved by:	re (bmah)
MFC after:	3 days
2003-05-17 01:01:03 +00:00
Philippe Charnier
629e80effb The .Nm utility. 2002-07-06 19:35:14 +00:00
Ruslan Ermilov
d1f8bca053 mdoc(7) police: tiny fixes. 2002-03-15 15:07:39 +00:00
Luigi Rizzo
617cc038bc Document the existence of machdep.guessed_bootdev, as suggested
by Sheldon.
For a detailed description look at the commit log for sysctl.c
rev.1.42 -- i do not think it is appropriate to put the full
description in this manpage, and the "boot" and "loader" manpages
where this description might go are also missing a description of
a number of similar variables, so i think this it is ok to limit
documentation to this now, and update it later when I (or someone
else) have a chance to revise "boot" and "loader".
2002-03-12 13:55:19 +00:00
Dima Dorfman
42277d473c Document `sysctl variable=/dev/foo' syntax.
PR:		34184
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2002-03-10 09:53:39 +00:00
Andrew R. Reiter
d0615c64a5 - Attempt to help declutter kern. sysctl by moving security out from
beneath it.

Reviewed by: rwatson
2002-01-16 06:55:30 +00:00
Luigi Rizzo
6105f81565 Add code to export and print the description associated to sysctl
variables. Use the -d flag in sysctl(8) to see this information.

Possible extensions to sysctl:
 + report variables that do not have a description
 + given a name, report the oid it maps to.

Note to developers: have a look at your code, there are a number of
	variables which do not have a description.

Note to developers: do we want this in 4.5 ? It is a very small change
	and very useful for documentation purposes.

Suggested by: Orion Hodson
2001-12-16 02:55:41 +00:00
Robert Watson
1bd0b24685 o Update sysctl.8 to reflect renaming of various security-related
sysctls, and to introduce new ones.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-11-30 21:55:22 +00:00
Anton Berezin
28dc1d2377 Replace =' with more correct `.Ql =''.
Mdoc-policed by:	ru
2001-10-31 15:57:55 +00:00
Anton Berezin
d0b8aabb19 Implement -e option. It modifies the output produced by sysctl(8) in
such a way that the name and the value of the variable(s) are separated
with `=' instead of the usual `: '.  This is useful for producing output
that can be fed back to the sysctl utility (pasted to sysctl.conf, for
example).

Reviewed by:	rwatson
Approved by:	markm
MFC after:	2 weeks
2001-10-30 20:15:32 +00:00
Yaroslav Tykhiy
2a6bc06445 Document the deprecated `-w' option in the COMPATIBILITY section. 2001-08-02 12:38:23 +00:00
Yaroslav Tykhiy
7e7cdfa09d Since the ``-w'' sysctl(8) option has been deprecated,
don't mention it in the manpages.
2001-07-30 14:18:14 +00:00