getconf

NAME

getconf - get configuration values

SYNOPSIS

getconf system_var
getconf path_var pathname
getconf -a

DESCRIPTION

The getconf(1) utility writes to standard output the value of system_var or the value of path_var based on the path name provided as pathname.

The operands supported for system_var and path_var can be found in POSIX.1 and POSIX.2.

If the operand is valid, but the variable is undefined for the system, getconf writes the string undefined to standard output.

This implementation of getconf supports an option (an extension from the standard):

-a
List the known system variables. Names that require a path name are given the path name ".".

The following system variables are supported for system_var:

_SC_2_C_BIND
Whether system provides POSIX.2 C language bindings.
_SC_2_C_DEV
Whether system supports the POSIX.2 C-Language Development Utilities Option.
_SC_2_CHAR_TERM
Whether system supports at least one terminal type capable of supporting all operations described in POSIX.2.
_SC_2_FORT_RUN
Whether system supports POSIX.2 FORTRAN Runtime Utilities Option.
_SC_2_FORT_DEV
Whether system supports POSIX.2 FORTRAN Development Utilities Option.
_SC_2_LOCALEDEF
Whether system supports the creation of locales.
_SC_2_SW_DEV
Whether system supports POSIX.2 Software Development Portability Utilities Option.
_SC_2_UPE
Whether system supports POSIX.2 User Portability Utilities Option
_SC_2_VERSION
Version of ISO/IEC 9945 (POSIX 1003.2) with which the system attempts to comply.
_SC_ARG_MAX
Maximum bytes of argument to exec(3).
_SC_BC_BASE_MAX
Maximum obase value allowed by bc(1).
_SC_BC_DIM_MAX
Maximum number of elements in a array.
_SC_BC_SCALE_MAX
Maximum scale value allowed by bc(1).
_SC_BC_STRING_MAX
Maximum length of a string constant in bc(1).
_SC_CHILD_MAX
Maximum number of simultaneous processes per user identifier (ID).
_SC_CLK_TCK
Number of micro-seconds per hz tick.
_SC_COLL_WEIGHTS_MAX
In a locale definition file, the maximum number of weights that can be assigned to the LC_COLLATE order keyword.
_SC_EXPR_NEST_MAX
Maximum number of expressions that can be nested within parentheses by expr(1).
_SC_JOB_CONTROL
Return 1 if job control is available on this system; otherwise, returns -1.
_SC_LINE_MAX
Maximum length in bytes, including trailing newline, of an input line for a text-processing utility
_SC_NGROUPS_MAX
Maximum number of supplemental groups.
_SC_OPEN_MAX
Maximum number of open files per user ID.
_SC_PAGE_SIZE
The virtual memory page size. This is always 65536 (64 KB), regardless of the actual Windows page size.
_SC_PAGESIZE
The virtual-memory page size. This is always 65536 (64 KB), regardless of the actual Windows page size.
_SC_RE_DUP_MAX
Maximum number of repetitions of a basic regular expression allowed in \{m,n\} notation.
_SC_SAVED_IDS
Returns 1 if saved set-group and saved set-user ID is available; otherwise, returns -1.
_SC_STREAM_MAX
Minimum maximum number of streams that a process can have open at any one time.
_SC_TZNAME_MAX
Minimum maximum number of types supported for the name of a time zone.
_SC_VERSION
The version of ISO/IEC 9945 (POSIX 1003.1) with which the system attempts to comply.

The following path variables are supported for path_var:

_PC_LINK_MAX
The maximum file link count.
_PC_MAX_CANON
The maximum number of bytes in terminal canonical input line.
_PC_MAX_INPUT
The minimum maximum number of bytes for which space is available in a terminal input queue.
_PC_NAME_MAX
The maximum number of bytes in a file name.
_PC_PATH_MAX
The maximum number of bytes in a path name.
_PC_PIPE_BUF
The maximum number of bytes that will be written atomically to a pipe.
_PC_CHOWN_RESTRICTED
Return 1 if appropriate privileges are required for the chown(3) system call; otherwise, return 0.
_PC_NO_TRUNC
Return 1 if file names longer than {KERN_NAME_MAX} are truncated.
_PC_VDISABLE
Returns the terminal character disabling value.

DIAGNOSTICS

The getconf(1) utility exits with 0 if the operand is valid, and >0 if an error occurs.

EXAMPLES

To determine the number of child processes supported on Interix:

$ getconf CHILD_MAX
28

To determine the minimum number of child processes mandated by POSIX.1:

$ getconf _POSIX_CHILD_MAX
6

SEE ALSO

pathconf(2)

sysconf(2)