aboutsummaryrefslogtreecommitdiff
path: root/sbin/sysctl
Commit message (Collapse)AuthorAgeFilesLines
* Merge sysctl.8:1.59, sysctl.c:1.68 from HEAD to RELENG_5:Robert Watson2005-09-222-5/+17
| | | | | | | | | 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. Notes: svn path=/stable/5/; revision=150477
* MFC:Christian Brueffer2005-02-121-3/+2
| | | | | | | | | Scheduled mdoc(7) sweep. Original revisions by: ru Notes: svn path=/stable/5/; revision=141731
* MFC: rev. 1.55 by hmpChristian Brueffer2005-02-121-0/+7
| | | | | | | Code for automatic name completion in a tcsh(1) environment. Notes: svn path=/stable/5/; revision=141729
* MFC 1.64:Suleiman Souhlal2005-02-041-1/+2
| | | | | | | | | | | | Get rid of a NULL dereference when oid is too long. Reviewed by: keramida Approved by: grehan (mentor) Approved by: grehan (mentor) Notes: svn path=/stable/5/; revision=141245
* MFC rev 1.62: Add support for the 'K' sysctl identifier for ACPI thermalNate Lawson2004-11-071-2/+12
| | | | | | | temperature conversions. Notes: svn path=/stable/5/; revision=137350
* Remove advertising clause from University of California Regent's license,Mark Murray2004-04-092-8/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core, imp Notes: svn path=/head/; revision=128073
* Add CTLTYPE_QUAD to the list of types for which we don't want an emptyDima Dorfman2004-03-021-1/+2
| | | | | | | value. All the other numeric types are doing it . . . Notes: svn path=/head/; revision=126472
* style.Makefile(5):Johan Karlsson2004-02-231-1/+1
| | | | | | | Use WARNS?= instead of WARNS=. Notes: svn path=/head/; revision=126178
* Alphabetization braino.Dag-Erling Smørgrav2003-11-071-1/+1
| | | | | | | Pointed out by: johan Notes: svn path=/head/; revision=122254
* Whitespace cleanup.Dag-Erling Smørgrav2003-11-071-9/+9
| | | | Notes: svn path=/head/; revision=122234
* Add a command-line option to format output for human readability.Dag-Erling Smørgrav2003-11-072-13/+25
| | | | | | | | Currently, the only effect it has is to print some (but not all) numbers using thousands separators. Notes: svn path=/head/; revision=122233
* Fix a few style glitches in the previous commit and make theMike Silbersack2003-11-011-5/+5
| | | | | | | | | tunable error message more brief. Suggested by: bde Notes: svn path=/head/; revision=121849
* Fix a 64 bit warning. Have set_T_dev_t() take a pointer to a size_t ratherPeter Wemm2003-10-261-2/+2
| | | | | | | than a pointer to an int, since that is what it really wants anyway. Notes: svn path=/head/; revision=121542
* Wrap a long line in the previous commitMike Silbersack2003-10-211-1/+2
| | | | | | | Suggested by: njl Notes: svn path=/head/; revision=121308
* Have sysctl print out a more useful error message when it detects that theMike Silbersack2003-10-211-1/+6
| | | | | | | user has attempted to write to a read only, tunable value. Notes: svn path=/head/; revision=121306
* mdoc(7): Use the new feature of the .In macro.Ruslan Ermilov2003-09-081-8/+8
| | | | Notes: svn path=/head/; revision=119893
* Tighten up the string->integer conversion in sysctl(8):Robert Watson2003-06-151-5/+25
| | | | | | | | | | | | | | | | | | | | | | (1) Reject zero-length strings for CTLTYPE_INT, _UINT, _LONG, _ULONG. Do not silently convert to 0. (2) When converting CTLTYPE_INT, _UINT, _LONG, and _ULONG, check the end pointer generated by strtol() and strtoul() rather than discarding it. Reject the string if either none of the string was useful for conversion to an integer, or if there was trailing garbage. I.e., we will not allow you to set a numeric sysctl to a value unless we can completely convert the string argument to a numeric value. I tripped over this when I put the following in /etc/sysctl.conf: kern.maxfiles="4000" Ouch. Notes: svn path=/head/; revision=116383
* .Nm -> .XrPhilippe Charnier2003-06-081-3/+4
| | | | Notes: svn path=/head/; revision=116038
* Clarify setting sysctl variables via loader(8) tunablesChristian Brueffer2003-05-181-4/+8
| | | | | | | | | | * s/can not/cannot/ Submitted by: ru (*) Approved by: re (rwatson) Notes: svn path=/head/; revision=115121
* Add information about setting sysctl variables via loader(8) andChristian Brueffer2003-05-171-1/+9
| | | | | | | | | | | | loader.conf(5) PR: 38426 (slightly modified) Submitted by: Phil Pennock <pdp@nl.demon.net> Approved by: re (bmah) MFC after: 3 days Notes: svn path=/head/; revision=115092
* This file does not seem to serve any purpose. It has never been hooked upTim J. Robbins2003-04-281-240/+0
| | | | | | | | to the build, and performs a subset of the functionality that the getconf(1) utility performs. Notes: svn path=/head/; revision=114141
* Output machdep.guessed_bootdev as an integer rather than try to formatPoul-Henning Kamp2003-04-031-54/+0
| | | | | | | | | it according to ancient and obsolete rules. This removes one more user of <sys/diskslice.h> Notes: svn path=/head/; revision=113039
* Fix what I think is an off-by-one in certain worst-case scenariosPeter Wemm2003-01-221-1/+1
| | | | | | | caused by rev 1.45. (eg: the estimate being exactly half of the result.) Notes: svn path=/head/; revision=109671
* Cleanup the formatting from the last commit, convert everything toMatthew Dillon2003-01-111-8/+21
| | | | | | | a more human-readable 'kilobytes' instead of pages. Notes: svn path=/head/; revision=109113
* Make 'sysctl vm.vmtotal' work properly using updated patch from Hiten.Matthew Dillon2003-01-111-0/+26
| | | | | | | | | | (the patch in the PR was stale). PR: kern/5689 Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=109097
* Fix a "bug" in sysctl(8). Limit the length when we print a string fromPeter Wemm2002-11-121-1/+1
| | | | | | | | the kernel rather than ignoring the length and keeping on going till we finally hit a \0 character in the buffer. Notes: svn path=/head/; revision=106829
* Replace various spelling with FALLTHROUGH which is lint()ablePhilippe Charnier2002-08-251-1/+1
| | | | Notes: svn path=/head/; revision=102411
* The .Nm utility.Philippe Charnier2002-07-061-5/+9
| | | | Notes: svn path=/head/; revision=99503
* Don't err(3) (and exit prematurely) when a sysctl's object size hasAlfred Perlstein2002-05-241-9/+16
| | | | | | | changed, instead just warn(3) Notes: svn path=/head/; revision=97232
* Don't forget to null-terminate string we got from sysctl (f.e. in 'A' format).Andrey A. Chernov2002-05-081-1/+1
| | | | | | | Stack garbadge may be printed otherwise. Notes: svn path=/head/; revision=96234
* Take the "tickadj" element out of struct clockinfo. Our adjtime(2)Poul-Henning Kamp2002-04-151-2/+2
| | | | | | | | implementation is being changed and the very concept of tickadj will no longer be meaningful. Notes: svn path=/head/; revision=94752
* o remove __PWarner Losh2002-03-211-4/+4
| | | | | | | o remove main prototype Notes: svn path=/head/; revision=92883
* mdoc(7) police: tiny fixes.Ruslan Ermilov2002-03-151-2/+2
| | | | Notes: svn path=/head/; revision=92338
* Document the existence of machdep.guessed_bootdev, as suggestedLuigi Rizzo2002-03-121-0/+1
| | | | | | | | | | | | | | 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". Notes: svn path=/head/; revision=92141
* Make the handling of machdep.guessed_bootdev compiled on i386 only.Luigi Rizzo2002-03-111-1/+7
| | | | Notes: svn path=/head/; revision=92066
* Export a (machine dependent) kernel variable bootdev asLuigi Rizzo2002-03-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | machdep.guessed_bootdev, and add code to sysctl to parse its value and give a (not necessarily correct) name to the device we booted from (the main motivation for this code is to use the info in the PicoBSD boot scripts, and the impact on the kernel is minimal). NOTE: the information available in bootdev is not always reliable, so you should not trust it too much. The parsing code is the same as in boot2.c, and cannot cover all cases -- as it is, it seems to work fine with floppies and IDE disks recognised by the BIOS. It _should_ work as well with SCSI disks recognised by the BIOS. Booting from a CDROM in floppy emulation will return /dev/fd0 (because this is what the BIOS tells us). Booting off the network (e.g. with etherboot) leaves bootdev unset so the value will be printed as "invalid (0xffffffff)". Finally, this feature might go away at some point, hopefully when we have a more reliable way to get the same information. MFC-after: 5 days Notes: svn path=/head/; revision=92018
* Document `sysctl variable=/dev/foo' syntax.Dima Dorfman2002-03-101-2/+24
| | | | | | | | PR: 34184 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> Notes: svn path=/head/; revision=91997
* #include <sys/time.h> instead of depending on namespace pollution inBruce Evans2002-02-251-3/+3
| | | | | | | | | | <sys/stat.h> for its prerequisite <sys/time.h>. #include <sys/param.h> in the correct place instead of bogusly including <sys/types.h>. Notes: svn path=/head/; revision=91217
* - Attempt to help declutter kern. sysctl by moving security out fromAndrew R. Reiter2002-01-161-5/+5
| | | | | | | | | beneath it. Reviewed by: rwatson Notes: svn path=/head/; revision=89414
* Allow setting of variables of type dev_t by indicating the name ofPoul-Henning Kamp2001-12-301-13/+34
| | | | | | | | | | | | | | | | | | a special file on the command line, eg: sysctl kern.dumpdev=/dev/ad1s1b In parse(), when a value is given for a CTLTYPE_QUAD variable, newval and newsize erroneously fail to be set because of an early "break". show_var() contains code that duplicates the functionality of the oidfmt() function. PR: 33151, 33150 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> Notes: svn path=/head/; revision=88696
* Add code to export and print the description associated to sysctlLuigi Rizzo2001-12-162-5/+19
| | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=88006
* Default to WARNS=2.David E. O'Brien2001-12-041-0/+1
| | | | | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike Notes: svn path=/head/; revision=87325
* o Update sysctl.8 to reflect renaming of various security-relatedRobert Watson2001-11-301-2/+5
| | | | | | | | | | sysctls, and to introduce new ones. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=87152
* Replace `=' with more correct ``.Ql =''.Anton Berezin2001-10-311-1/+2
| | | | | | | Mdoc-policed by: ru Notes: svn path=/head/; revision=85769
* Implement -e option. It modifies the output produced by sysctl(8) inAnton Berezin2001-10-302-13/+31
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=85747
* Document the deprecated `-w' option in the COMPATIBILITY section.Yaroslav Tykhiy2001-08-021-0/+4
| | | | Notes: svn path=/head/; revision=81045
* Since the ``-w'' sysctl(8) option has been deprecated,Yaroslav Tykhiy2001-07-301-1/+1
| | | | | | | don't mention it in the manpages. Notes: svn path=/head/; revision=80634
* mdoc(7) police: -xwidth has been fold into -width.Ruslan Ermilov2001-07-131-1/+1
| | | | Notes: svn path=/head/; revision=79658
* mdoc(7) police: fixed formatting.Ruslan Ermilov2001-07-051-37/+33
| | | | Notes: svn path=/head/; revision=79314
* modfied sysctl command to allow setting values > 2GB if the mib supports it.Jim Pirzyk2001-06-181-1/+19
| | | | | | | | | PR: kern/21132 Reviewed by: no objections to by -arch MFC after: 1 month Notes: svn path=/head/; revision=78434