summaryrefslogtreecommitdiffstats
path: root/sbin/sysctl
Commit message (Collapse)AuthorAgeFilesLines
* MFC r310961:avos2017-01-081-1/+1
| | | | sysctl(8): fix typename for uint32_t
* MFC r305942:kib2016-09-251-3/+0
| | | | Consolidate four efi_next_descriptor() definitions.
* Fix "sysctl vm.vmtotal" output on machines with > 2TB virtual memoryasomers2016-06-241-9/+9
| | | | | | | | | | | | | sbin/sysctl/sysctl.c Fix integer overflows in printf format strings PR: 199673 Submitted by: Vitaly Magerya Reviewed by: cem Approved by: re (marius) MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6941
* Explicitly add more files to the 'runtime' package.gjb2016-02-091-0/+1
| | | | Sponsored by: The FreeBSD Foundation
* Add -t option to display field types.araujo2015-12-102-12/+30
| | | | | | | | 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
* Follow-up to r290475: Add sysctl(8) support for added typescem2015-11-071-28/+81
| | | | Sponsored by: EMC / Isilon Storage Division
* sysctl(8): Fix style nitscem2015-10-231-5/+6
| | | | | Suggested by: bde Sponsored by: EMC / Isilon Storage Division
* Sysctl: Add common support for U8, U16 typescem2015-10-221-0/+28
| | | | Sponsored by: EMC / Isilon Storage Division
* Only print the errno string in case sysctl(3) does not file with ENOENTbapt2015-10-071-1/+5
| | | | | | | | | | | | | | | This reduces the noise in error reporing from sysctl(8): Before: $ sysctl bla=something sysctl: unknown oid 'bla': No such file or directory After: $ sysctl bla=something sysctl: unknown oid 'bla' MFC after: 1 week Sponsored by: Gandi.net
* Trim spaces at the end of the buffer before trying to convert it to an oidbapt2015-10-071-0/+6
| | | | | | | | This allows to write entries in sysctl.conf with spaces before the '=' like kern.ipc.shmmax = 9663676416 MFC after: 1 week Sponsored by: Gandi.net
* Teach sysctl about the new optional suffix after IK to specifyimp2015-07-291-8/+42
| | | | | | | precision. Update input as well. Add IK to the manual (it was missing completely). Differential Revision: https://reviews.freebsd.org/D3181
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-272-12/+33
| |\ | |/ |/|
| * Merge from head@274682sjg2014-11-191-105/+224
| |\
| * \ Merge head from 7/28sjg2014-08-191-2/+2
| |\ \
| * | | Updated dependenciessjg2014-05-161-1/+0
| | | |
| * | | Updated dependenciessjg2014-05-101-0/+2
| | | |
| * | | Merge headsjg2014-04-282-3/+3
| |\ \ \
| * | | | Updated dependenciessjg2013-03-111-0/+1
| | | | |
| * | | | Updated dependenciessjg2013-02-161-2/+0
| | | | |
| * | | | Sync with HEAD.obrien2013-02-082-71/+207
| |\ \ \ \
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | | | | add support for specifying an initial buffer size when fetching ajmg2015-02-132-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* | | | | | Fix inverted logic introduced in r272154.delphij2014-12-011-2/+5
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | Noticed by: trasz MFC after: 2 weeks
* | | | | Refactor the code a little bit to reduce duplicated code.delphij2014-09-261-102/+87
| | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: mjg MFC after: 2 weeks
* | | | | Explicitly set errno to 0 before calling strto*.delphij2014-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Suggested by: mjg MFC after: 2 weeks
* | | | | The strtol(3) family of functions would set errno when it hits one.delphij2014-09-251-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check errno and handle it as invalid input. Obtained from: HardenedBSD Submitted by: David CARLIER <devnexen@gmail.com> MFC after: 2 weeks
* | | | | Constify a parameter of name2oid. No functional change.delphij2014-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | MFC after: 2 months
* | | | | Add a sysctl to export the EFI memory map along with a handler in thejhb2014-09-131-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sysctl(8) binary to format it. Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D771
* | | | | Pass the length of an structure to the pretty-printer backends as ajhb2014-09-121-12/+12
| | | | | | | | | | | | | | | | | | | | size_t instead of an int.
* | | | | - Add a new structure type for the ACPI 3.0 SMAP entry that includes thejhb2014-08-291-0/+29
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optional attributes field. - Add a 'machdep.smap' sysctl that exports the SMAP table of the running system as an array of the ACPI 3.0 structure. (On older systems, the attributes are given a value of zero.) Note that the sysctl only exports the SMAP table if it is available via the metadata passed from the loader to the kernel. If an SMAP is not available, an empty array is returned. - Add a format handler for the ACPI 3.0 SMAP structure to the sysctl(8) binary to format the SMAP structures in a readable format similar to the format found in boot messages. MFC after: 2 weeks
* | | | Don't hide zero-length strings when doing sysctl listings.hselasky2014-06-271-2/+2
| |_|/ |/| | | | | | | | MFC after: 1 week
* | | Fix warnings to not append "No error: 0".trasz2013-11-261-2/+2
| | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation
* | | Fix a typo: s/wriable/writable/dteske2013-11-121-1/+1
| |/ |/|
* | Use the right format string for line buffer.delphij2013-01-131-1/+1
| | | | | | | | | | PR: bin/174910 Submitted by: Fabian Keil <fk fabiankeil.de>
* | Teach sysctl(8) about parsing a file (while I'm there also give itdelphij2012-12-132-62/+175
| | | | | | | | | | | | | | capability of parsing both = and : formats). Submitted by: hrs (initial version, bugs are mine) MFC after: 3 months
* | Make Tflag and Wflag filters work for more sysctl options.alfred2012-12-121-11/+11
| | | | | | | | | | To do this move the Tflag and Wflag checks earlier in show_var() so we bail earlier for variables not matching our query.
* | Allow sysctl to filter boot and runtime tunables.alfred2012-12-112-6/+30
| | | | | | | | | | | | | | | | | | | | | | 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
* | In parse():delphij2012-12-111-6/+5
|/ | | | | | | | - Only operate on copy, don't operate on source. - Eliminate home-rolled strsep(). - Constify the parameter. MFC after: 2 weeks
* s/Free Memory Pages/Free Memory/ to avoid confusion, since we'reeadler2012-04-111-1/+1
| | | | | | | | | reporting a number of bytes rather than a number of pages PR: misc/165208 Submitted by: Arnaud Lacombe <lacombar@gmail.com> Approved by: cperciva MFC after: 3 days
* mdoc: terminate quoted strings.joel2012-03-261-66/+66
| | | | Reviewed by: brueffer
* If the -d flag is specified, ignore any new values specified and onlyjhb2011-12-011-1/+1
| | | | | | | display the descriptions of specified nodes. Reported by: Jason Hellenthal jhell of dataix net MFC after: 2 weeks
* Introduce signed and unsigned version of CTLTYPE_QUAD, renamingmdf2011-01-191-24/+42
| | | | existing uses. Rename sysctl_handle_quad() to sysctl_handle_64().
* sysctl(8) should use the CTLTYPE to determine the type of data whenmdf2011-01-191-25/+29
| | | | | | | | | | | reading. (This was already done for writing to a sysctl). This requires all SYSCTL setups to specify a type. Most of them are now checked at compile-time. Remove SYSCTL_*X* sysctl additions as the print being in hex should be controlled by the -x flag to sysctl(8). Succested by: bde
* Fix typo and bump date.mdf2011-01-171-2/+2
|
* The kernel is not exporting any "T,dev_t" sysctl nodes anymore, somdf2011-01-172-56/+2
| | | | remove the capability and mention from sysctl(8).
* Make the format of "Real Memory" and "Virtual Memory" lines morezec2010-09-161-2/+2
| | | | | | consistent with the rest of sysctl vm.vmtotal output. MFC after: 3 days
* Free the memory allocated via strdup.brucec2010-03-131-0/+1
| | | | | | | PR: bin/113881 Submitted by: Alexander Drozdov dzal_mail mtu-net.ru Approved by: rrs (mentor) MFC after: 1 week
* sysctl(8): make WARNS=3 cleanuqs2010-02-152-12/+18
| | | | | | | Fixes inspired by work done in DragonflyBSD. PR: bin/140016 Approved by: ed (Co-mentor)
OpenPOWER on IntegriCloud