GETCONF(1)GETCONF(1)NAMEgetconf - get configuration variables (XPG4)
SYNOPSISgetconf [ -v specification ] system_var
getconf [ -v specification ] path_var path_name
DESCRIPTIONgetconf provides a method to determine the current values of certain
configurable system limits, options and parameters.
If the system_var argument is given, getconf(1) will print the value of
the requested system parameter.
If the path_var and pathname arguments are given, getconf(1) will print
the value of the requested variable specified by the path_var argument
for the path specified by the pathname operand.
OPTIONS
The following option is supported:
-v specification
Indicate a specification and version of a XBS5 conforming
compilation environment for which configuration variables are
to be determined. Valid specification values are:
XBS5_ILP32_OFF32
XBS5_ILP32_OFFBIG
XBS5_LP64_OFF64
XBS5_LPBIG_OFFBIG
Currently, there are no variable values that are affected by this option.
OPERANDS
The following operands are supported:
path_var
A name of a configuration variable whose value is available
from the pathconf() function. All of the values in the
following table are supported in addition to others described
in pathconf(1):
LINK_MAX NAME_MAX _POSIX_CHOWN_RESTRICTED
MAX_CANON PATH_MAX _POSIX_NO_TRUNC
MAX_INPUT PIPE_BUF _POSIX_VDISABLE
pathname
Page 1
GETCONF(1)GETCONF(1)
A pathname for which the variable specified by path_var is to
be determined.
system_var
A name of a configuration variable whose value is available
from the sysconf() function. All of the values in the
following table are supported:
ARG_MAX POSIX2_BC_SCALE_MAX _POSIX_OPEN_MAX
ATEXIT_MAX POSIX2_BC_STRING_MAX _POSIX_PATH_MAX
BC_BASE_MAX POSIX2_CHAR_TERM _POSIX_PIPE_BUF
BC_DIM_MAX POSIX2_COLL_WEIGHTS_MAX
BC_SCALE_MAX POSIX2_C_BIND _POSIX_SAVED_IDS
BC_STRING_MAX POSIX2_C_DEV _POSIX_STREAM_MAX
CHARCLASS_NAME_MAX POSIX2_C_VERSION _POSIX_TZNAME_MAX
CHAR_BIT POSIX2_EXPR_NEST_MAX _POSIX_VERSION
CHAR_MAX POSIX2_FORT_DEV _XOPEN_CRYPT
CHAR_MIN POSIX2_FORT_RUN _XOPEN_ENH_I18N
CHILD_MAX POSIX2_LINE_MAX _XOPEN_SHM
CLK_TCK POSIX2_LOCALEDEF _XOPEN_UNIX
COLL_WEIGHTS_MAX POSIX2_RE_DUP_MAX _XOPEN_VERSION
CS_PATH POSIX2_SW_DEV _XOPEN_XCU_VERSION
EXPR_NEST_MAX POSIX2_UPE _XOPEN_XPG2
INT_MAX POSIX2_VERSION _XOPEN_XPG3
IOV_MAX RE_DUP_MAX _XOPEN_XPG4
KERN_POINTERS SCHAR_MAX _XBS5_ILP32_OFF32
KERN_SIM SCHAR_MIN _XBS5_ILP32_OFFBIG
LINE_MAX SHRT_MIN _XBS5_LP64_OFF64
LONG_BIT SSIZE_MAX _XBS5_LPBIG_OFFBIG
LONG_MAX STREAM_MAX XBS5_ILP32_OFF32_CFLAGS
LONG_MIN TMP_MAX XBS5_ILP32_OFF32_LDFLAGS
MB_LEN_MAX TZNAME_MAX XBS5_ILP32_OFF32_LIBS
NGROUPS_MAX UCHAR_MAX XBS5_ILP32_OFF32_LINTFLAGS
NL_ARGMAX UINT_MAX XBS5_ILP32_OFFBIG_CFLAGS
NL_LANGMAX ULONG_MAX XBS5_ILP32_OFFBIG_LDFLAGS
NL_MAX USHRT_MAX XBS5_ILP32_OFFBIG_LIBS
NL_MSGMAX WORD_BIT XBS5_ILP32_OFFBIG_LINTFLAGS
NL_SETMAX _POSIX_ARG_MAX XBS5_LP64_OFF64_CFLAGS
NL_TEXTMAX _POSIX_CHILD_MAX XBS5_LP64_OFF64_LDFLAGS
NZERO _POSIX_JOB_CONTROL XBS5_LP64_OFF64_LIBS
OPEN_MAX _POSIX_LINK_MAX XBS5_LP64_OFF64_LINTFLAGS
PAGESIZE _POSIX_MAX_CANON XBS5_LPBIG_OFFBIG_CFLAGS
PAGE_SIZE _POSIX_MAX_INPUT XBS5_LPBIG_OFFBIG_LDFLAGS
POSIX2_BC_BASE_MAX _POSIX_NAME_MAX XBS5_LPBIG_OFFBIG_LIBS
POSIX2_BC_DIM_MAX _POSIX_NGROUPS_MAX XBS5_LPBIG_OFFBIG_LINTFLAGS
STDOUT
If the specified variable is defined on the system and its value is
described to be available, its value will be written in the following
format:
Page 2
GETCONF(1)GETCONF(1)
"%s\n", <value>
Otherwise, if the specified variable is defined on the system, its value
will be written in the following format:
"%d\n", <value>
If the specified variable is valid, but is undefined on the system,
getconf will write using the following format:
"undefined\n"
If the variable name is invalid or an error occurs, nothing will be
written to standard output.
EXIT STATUSgetconf exits with a status of greater than zero if any errors are
encountered, otherwise it exits with status 0.
SEE ALSOpathconf(1), sysconf(3C), pathconf(2), limits(4)
Page 3