NAME
ssyyssccttll - get or set kernel state
SYNOPSIS
ssyyssccttll [-bbnn] name ...
ssyyssccttll [-bbnn] -ww name=value ...
ssyyssccttll [-bbnn] -aa
ssyyssccttll [-bbnn] -AA
ssyyssccttll [-bbnn] -XX
DESCRIPTION
The ssyyssccttll utility retrieves kernel state and allows processes with appropriate privilege to set kernel state. The state to be retrieved or set is described using a ``Management Information Base'' (``MIB'') style name, described as a dotted set of components. The following options are available:-AA List all MIB variables including opaque variables (which are nor-
mally suppressed). The format and length are printed, as well as a hex dump of the first sixteen bytes of the value.-aa List all the currently available non-opaque values. This option
is ignored if one or more variable names are specified on the command line.-bb Force the value of the variable(s) to be output in raw, binary
format. No names are printed and no terminating newlines are output. This is mostly useful with a single variable.-nn Show only variable values, not their names. This option is use-
ful for setting shell variables. For instance, to save the page-
size in variable psize, use:set psize=`sysctl -n hw.pagesize`
-XX Same as -AA but prints a hex dump of the entire value instead of
just the first few bytes.-ww name=value
Used to set values. The MIB name ( name ) followed by an equal sign and the new value ( value ) to be used. If just a MIB style name is given, the corresponding value is retrieved. The information available from ssyyssccttll consists of integers, strings, and tables. The tabular information can only be retrieved by special purposeprograms such as ppss, ssyyssttaatt, and nneettssttaatt. The string and integer infor-
mation is summarized below. For a detailed description of these variablesee sysctl(3). The changeable column indicates whether a process with
appropriate privilege can change the value. NNaammee TTyyppee CChhaannggeeaabbllee kern.ostype string no kern.osrelease string no kern.osrevision integer no kern.version string no kern.maxvnodes integer yes kern.maxproc integer yes kern.maxfiles integer yes kern.argmax integer no kern.securelevel integer raise only kern.hostname string yes kern.hostid integer yes kern.clockrate struct no kern.posix1version integer no kern.ngroups integer no kern.jobcontrol integer no kern.savedids integer no kern.linkmax integer no kern.maxcanon integer no kern.maxinput integer no kern.namemax integer no kern.pathmax integer no kern.pipebuf integer no kern.chownrestricted integer no kern.notrunc integer no kern.vdisable integer no kern.boottime struct no vm.loadavg struct no vm.swapusage struct no machdep.consoledevice devt no net.inet.ip.forwarding integer yes net.inet.ip.redirect integer yes net.inet.ip.ttl integer yes net.inet.icmp.maskrepl integer yes net.inet.udp.checksum integer yes hw.machine string no hw.model string no hw.ncpu integer no hw.byteorder integer no hw.physmem integer no hw.usermem integer no hw.pagesize integer no user.cspath string no user.bcbasemax integer no user.bcdimmax integer no user.bcscalemax integer no user.bcstringmax integer no user.collweightsmax integer no user.exprnestmax integer no user.linemax integer no user.redupmax integer no user.posix2version integer no user.posix2cbind integer no user.posix2cdev integer no user.posix2charterm integer no user.posix2fortdev integer no user.posix2fortrun integer no user.posix2localedef integer no user.posix2swdev integer no user.posix2upe integer no The ssyyssccttll program can get or set debugging variables that have been identified for its display. This information can be obtained by using the command:sysctl debug
In addition, ssyyssccttll can extract information about the filesystems that have been compiled into the running system. This information can be obtained by using the command:sysctl vfs
By default, only filesystems that are actively being used are listed.Use of the -AA flag lists all the filesystems compiled into the running
kernel. EEXXAAMMPPLLEESS For example, to retrieve the maximum number of processes allowed in the system, one would use the follow request:sysctl kern.maxproc
To set the maximum number of processes allowed in the system to 1000, one would use the follow request:sysctl -w kern.maxproc=1000
Information about the system clock rate may be obtained with:sysctl kern.clockrate
Information about the load average history may be obtained with:sysctl vm.loadavg
Information about the system's swap space usage may be obtained with:sysctl vm.swapusage
FILESkernel and hardware identifiers, and user level identifiers
definitions for top level identifiers, second level definitions for second level network identifiers definitions for third level profiling identifiers fiers
definitions for second level virtual memory identi- definitions for third level Internet identifiers and fourth level IP identifiers definitions for fourth level ICMP identifiers definitions for fourth level UDP identifiers SEE ALSO
sysctl(3)
HISTORY ssyyssccttll first appeared in 4.4BSD. BSD December 21, 2019 BSD