ChorusOS 5.0 Features and Architecture Overview

The sysctl Facility

The sysctl facility allows the retrieval of information from the system, and allows processes with appropriate privileges to set system information.

The information available from sysctl consists of integers, strings, tables, or opaque data structures. This information is organized in a tree structure containing two types of node:

Proxy leaf nodes

Access data acquired dynamically on demand. These nodes transparently handle the information exposed by the microkernel

Dynamically created nodes

Represent the information exposed by the devices, as it appears and disappears dynamically

Only proxy leaf nodes have data associated with them.

The sysctl nodes are natively identified using a management information base (MIB) style name, an OID, in the form of a unique array of integers.

sysctl API

Two sysctl system calls are provided:

Function 

Description 

sysctl()

Get/set a value identified by its OID 

sysctlbyname()

Get/set a value identified by its name 

For details, see the sysctl(1M) man page.