| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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...
|
|
|
|
|
| |
Noticed by: trasz
MFC after: 2 weeks
|
|
|
|
|
| |
Reviewed by: mjg
MFC after: 2 weeks
|
|
|
|
|
| |
Suggested by: mjg
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
Check errno and handle it as invalid input.
Obtained from: HardenedBSD
Submitted by: David CARLIER <devnexen@gmail.com>
MFC after: 2 weeks
|
|
|
|
| |
MFC after: 2 months
|
|
|
|
|
|
|
|
| |
sysctl(8) binary to format it.
Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D771
|
|
|
|
| |
size_t instead of an int.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
| |
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
| |
PR: bin/174910
Submitted by: Fabian Keil <fk fabiankeil.de>
|
|
|
|
|
|
|
| |
capability of parsing both = and : formats).
Submitted by: hrs (initial version, bugs are mine)
MFC after: 3 months
|
|
|
|
|
| |
To do this move the Tflag and Wflag checks earlier in show_var() so
we bail earlier for variables not matching our query.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
- Only operate on copy, don't operate on source.
- Eliminate home-rolled strsep().
- Constify the parameter.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed by: brueffer
|
|
|
|
|
|
|
| |
display the descriptions of specified nodes.
Reported by: Jason Hellenthal jhell of dataix net
MFC after: 2 weeks
|
|
|
|
| |
existing uses. Rename sysctl_handle_quad() to sysctl_handle_64().
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
remove the capability and mention from sysctl(8).
|
|
|
|
|
|
| |
consistent with the rest of sysctl vm.vmtotal output.
MFC after: 3 days
|
|
|
|
|
|
|
| |
PR: bin/113881
Submitted by: Alexander Drozdov dzal_mail mtu-net.ru
Approved by: rrs (mentor)
MFC after: 1 week
|
|
|
|
|
|
|
| |
Fixes inspired by work done in DragonflyBSD.
PR: bin/140016
Approved by: ed (Co-mentor)
|
|
|
|
|
| |
Noticed by: ru
MFC after: 5 days
|
|
|
|
|
| |
Submitted by: dhw
MFC after: 1 week (with r203310)
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Right now sysctl just prints the major/minor numbers of a device.
Instead of rolling our own routine for this, we'd better just call
devname(3) to perform a translation to a device name for us.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't clobber *p with '\0' when testing whether it has the value of 'F'.
Just use the semantics of strtof() properly. If it returns p, we know
that it parsed the string until it reached 'C' or 'F'.
The code has not changed since it has been imported (r161951, Sep 3,
2006).
Submitted by: Alexandre Perrin <kaworu@kaworu.ch>
MFC after: 1 week
|
|
|
|
| |
it intmax_t and use %j in printf.
|
|
|
|
|
|
|
|
|
| |
others. In the case where it displayed warnings it would still return
succesfully. Modify it so that it returns the number of sysctls that
it was not able to set.
Make use of this in rc.d to display only *unsuccessfull* attempts to
set sysctls.
|
|
|
|
|
|
| |
PR: docs/113570
Submitted by: lawrance
MFC After: 3 days (where applicable)
|
|
|
|
|
| |
Requested by: phk
Discussed on: cvs-all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
Submitted by: cnst@ (Constantine A. Murenin)
Sponsored by: Google Summer of Code 2007
Approved by: re@ (bmah)
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
| |
a warning, return 1 instead of 0 to indicate that we didn't print
anything, so that top-level callers don't print a spurious newline.
This is mainly to fix output formatting when stderr is redirected. It
also helps in some cases when stderr is interleaved with stdout,
depending on the details of the interleaving (this program has the
usual null explicit support for syncing stderr with stdout).
Return 1 instead of -1 after printing the "malloc failed" warning, since
the return value is boolean.
|
| |
|
|
|
|
| |
warnings.
|
|
|
|
|
| |
unused include, adding parens for return and sizeof and renaming,
adding some missing whitespace and sorting some variables.
|
|
|
|
|
|
| |
value into a variable of the right type and then printing it via
an intmax_t. This makes avoids some duplication and makes it easy
to add a new integer format Q for printing things of type CTLTYPE_QUAD.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
them unsigned I made the possible overflows hard to detect,
and it only saved 1 bit which isn't principal, even less now
that the underlying issue with the total of virtual memory has
been fixed. (For the record, it will overflow with >=2T of
VM total, with 32-bit ints used to keep counters in pages.)
- While here, fix printing of other "struct vmtotal" members
such as t_rq, t_dw, t_pw, and t_sw as they are also signed.
Reviewed by: bde
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
| |
- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8)
when printing values of "struct vmmeter" in kilobytes as
they don't necessarily fit into 32 bits. (Fix sysctl(8)
reporting of a total virtual memory; it's in pages too.)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
the BUGS section of the alloca(3) manpage. In particular, when
the number of TCP sockets is several tens of thousand, trying to
"sysctl -a" would SIGSEGV on the net.inet.tcp.pcblist entry (it
would exceed the stacksize ulimit, in an undetectable manner).
Reported by: Igor Sysoev
|