getconf(1)
NAME
getconf − get system configuration values
SYNOPSIS
getconf [parameter_name] [pathname]
DESCRIPTION
The getconf command provides a program interface to the confstr(3C), pathconf(2), and sysconf(2) libraries.
The parameter_name argument specifies the configuration value desired in confstr(), pathconf(), or sysconf(). For parameter_name, operand values listed in the table with pathconf() as the underlying function, the pathname operand must also be supplied; otherwise, the pathname operand must not be supplied.
EXTERNAL INFLUENCES
Environment Variables
LC_MESSAGES determines the language in which messages are displayed.
If LC_MESSAGES is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.
If any internationalization variable contains an invalid setting, getconf behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single-byte and multi-byte character code sets are supported.
RETURN VALUE
The error codes returned by getconf are:
0 Success. A value corresponding to the operand was returned.
1 One or more missing or extra operands.
2 Operand was not recognized.
3 pathname could not be accessed.
EXAMPLES
Request the number of intervals per second:
getconf CLK_TCK
Request the maximum value of a file’s link count:
getconf LINK_MAX /etc/passwd
Other supported inquiries include the following:
| ARG_MAX | _POSIX_CHILD_MAX | POSIX2_C_DEV |
| BC_BASE_MAX | _POSIX_JOB_CONTROL | POSIX2_EXPR_NEST_MAX |
| BC_DIM_MAX | _POSIX_NGROUPS_MAX | POSIX2_FORT_DEV |
| BC_SCALE_MAX | _POSIX_OPEN_MAX | POSIX2_FORT_RUN |
| BC_STRING_MAX | _POSIX_SAVED_IDS | POSIX2_LINE_MAX |
| CHILD_MAX | _POSIX_SSIZE_MAX | POSIX2_LOCALEDEF |
| CLK_TCK | _POSIX_STREAM_MAX | POSIX2_RE_DUP_MAX |
| COLL_WEIGHTS_MAX | _POSIX_TZNAME_MAX | POSIX2_SW_DEV |
| CS_PATH | _POSIX_VERSION | POSIX2_VERSION |
| EXPR_NEST_MAX | POSIX2_BC_BASE_MAX | RE_DUP_MAX |
| LINE_MAX | POSIX2_BC_DIM_MAX | SC_PASS_MAX |
| NGROUPS_MAX | POSIX2_BC_SCALE_MAX | SC_XOPEN_VERSION |
| OPEN_MAX | POSIX2_BC_STRING_MAX | STREAM_MAX |
| PATH | POSIX2_COLL_WEIGHTS_MAX | TZNAME_MAX |
| _POSIX_ARG_MAX | POSIX2_C_BIND | |
| CHARCLASS_NAME_MAX | CHAR_BIT | CHAR_MAX |
| CHAR_MIN | NZERO | POSIX2_CHAR_TERM |
| POSIX2_C_VERSION | POSIX_OPEN_MAX | POSIX_PATH_MAX |
| POSIX_PIPE_BUF | POSIX_SAVED_IDS | POSIX_SSIZE_MAX |
| POSIX_STREAM_MAX | POSIX_TZNAME_MAX | POSIX_VERSION |
| SCHAR_MAX | SCHAR_MIN | INT_MAX |
| INT_MIN | LONG_BIT | LONG_MAX |
| LONG_MIN | MB_LEN_MAX | NL_NMAX |
| NL_ARGMAX | NL_LANGMAX | NL_MSGMAX |
| NL_SETMAX | NL_TEXTMAX | POSIX2_UPE |
| POSIX_ARG_MAX | POSIX_CHILD_MAX | POSIX_JOB_CONTROL |
| POSIX_LINK_MAX | POSIX_MAX_CANON | POSIX_MAX_INPUT |
| POSIX_NAME_MAX | POSIX_NGROUPS_MAX | SHRT_MAX |
| SHRT_MIN | SSIZE_MAX | TMP_MAX |
| UCHAR_MAX | UINT_MAX | ULONG_MAX |
| USHRT_MAX | WORD_BIT | XOPEN_VERSION |
| XOPEN_XCU_VERSION | XOPEN_XPG2 | XOPEN_XPG3 |
| XOPEN_XPG4 |
Supported inquiries requiring the second parameter include:
| LINK_MAX | PIPE_BUF | _POSIX_NAME_MAX |
| MAX_CANON | _POSIX_CHOWN_RESTRICTED | _POSIX_NO_TRUNC |
| MAX_INPUT | _POSIX_LINK_MAX | _POSIX_PATH_MAX |
| NAME_MAX | _POSIX_MAX_CANON | _POSIX_PIPE_BUF |
| PATH_MAX | _POSIX_MAX_INPUT | _POSIX_VDISABLE |
| POSIX_NO_TRUNC | POSIX_CHOWN_RESTRICTED | POSIX_VDISABLE |
AUTHOR
getconf was developed by HP and POSIX.
SEE ALSO
pathconf(2), sysconf(2), confstr(3C).
STANDARDS CONFORMANCE
getconf: POSIX.2, XPG4
Hewlett-Packard Company — HP-UX Release 10.20: July 1996