History log of /freebsd/sbin/sysctl/sysctl.c (Results 126 – 150 of 312)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 09c817ba 03-Jul-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- MFC


# db87e2dc 23-Jun-2009 John Hay <jhay@FreeBSD.org>

time_t does not always fit into long, for instance on arm. So rather cast
it intmax_t and use %j in printf.


Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0
# d9fcd86c 24-Jun-2008 Mike Makonnen <mtm@FreeBSD.org>

The sysctl(8) program exits on some errors and only emits warnings on
others. In the case where it displayed warnings it would still return
succesfully. Modify it so that it returns the number of sys

The sysctl(8) program exits on some errors and only emits warnings on
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.

show more ...


Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0
# 9f05d312 15-Oct-2007 Alexander Leidinger <netchild@FreeBSD.org>

Backout sensors framework.

Requested by: phk
Discussed on: cvs-all


# 99f6b270 14-Oct-2007 Alexander Leidinger <netchild@FreeBSD.org>

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)
* sy

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)

show more ...


# 6b6b665b 11-Jun-2007 Bruce Evans <bde@FreeBSD.org>

When we return from a "show" function without printing anything except
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 new

When we return from a "show" function without printing anything except
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.

show more ...


# e37d2b30 10-Jun-2007 David Malone <dwmalone@FreeBSD.org>

Some improvements to the int-type printing code based on suggestions by bde.


# fd8c668a 10-Jun-2007 David Malone <dwmalone@FreeBSD.org>

Fix a number of WARNS, including printf, constness and unsigned comparison
warnings.


# 21e1f596 10-Jun-2007 David Malone <dwmalone@FreeBSD.org>

Some style improvements suggested by bde, including removing an
unused include, adding parens for return and sizeof and renaming,
adding some missing whitespace and sorting some variables.


# 41e419cb 04-Jun-2007 David Malone <dwmalone@FreeBSD.org>

Use common code for printing ints and longs by coppying the sysctl
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
t

Use common code for printing ints and longs by coppying the sysctl
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.

show more ...


Revision tags: release/6.2.0_cvs, release/6.2.0
# f195a122 10-Dec-2006 Warner Losh <imp@FreeBSD.org>

Style: Shorten a couple of lines with u_int and u_long.


# bad4d172 28-Nov-2006 Ruslan Ermilov <ru@FreeBSD.org>

- Revert signedness type changes to "struct vmtotal"; by making
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

- Revert signedness type changes to "struct vmtotal"; by making
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

show more ...


# 20739dfa 23-Nov-2006 Ruslan Ermilov <ru@FreeBSD.org>

Fix the format specifier suitable for uintmax_t.


# 5c88a11e 20-Nov-2006 Ruslan Ermilov <ru@FreeBSD.org>

- Fix types of "struct vmmeter" members so they are unsigned.

- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8)
when printing values of "struct vmmeter" in kilobytes as
they don't neces

- Fix types of "struct vmmeter" members so they are unsigned.

- 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.)

show more ...


# d566310d 12-Oct-2006 Hartmut Brandt <harti@FreeBSD.org>

Remove a debugging statement from the previous commit.


# 48cd487a 12-Oct-2006 Hartmut Brandt <harti@FreeBSD.org>

Don't free the buffer with the sysctl value before printing it.


# ccf25977 06-Sep-2006 Ruslan Ermilov <ru@FreeBSD.org>

While convenient, avoid using alloca() for reasons specified in
the BUGS section of the alloca(3) manpage. In particular, when
the number of TCP sockets is several tens of thousand, trying to
"sysct

While convenient, avoid using alloca() for reasons specified in
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

show more ...


# d45564dc 03-Sep-2006 Hajimu UMEMOTO <ume@FreeBSD.org>

Support Celsius (nn.nC), Fahrenheit (nn.nF) and Kelvin (nnnn) to
specify temperature.

Reviewed by: njl
MFC after: 3 days


# e556ec91 15-Aug-2006 Ruslan Ermilov <ru@FreeBSD.org>

Fix printing of integer Kelvins broken in rev. 1.71, which is
fatal on sizeof(int) != sizeof(long) systems (such as amd64).

MFC after: 1 day


# c157a036 13-Aug-2006 David E. O'Brien <obrien@FreeBSD.org>

Add an extension to the UINT & ULONG types. The XINT & XLONG types behave
the same, except sysctl(8) will print out the values in hex.


# 091eb5a3 04-Aug-2006 Nate Lawson <njl@FreeBSD.org>

Use floating point instead of hacking something together. Suggested by
bde@. Fix nearby int conversion and a couple style bugs.

MFC after: 1 day


# e05cdb74 25-Jul-2006 Nate Lawson <njl@FreeBSD.org>

Fix printing of negative decimal values in Kelvin to Celsius conversion.

MFC after: 3 days


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0
# 855b068a 01-Dec-2005 Ruslan Ermilov <ru@FreeBSD.org>

Add -q to usage().


Revision tags: release/6.0.0_cvs, release/6.0.0
# f93d36fd 15-Sep-2005 Robert Watson <rwatson@FreeBSD.org>

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 ker

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

show more ...


Revision tags: release/5.4.0_cvs, release/5.4.0
# b2680e20 13-Apr-2005 Matthew N. Dodd <mdodd@FreeBSD.org>

Show descriptions for type CTLTYPE_NODES.


12345678910>>...13