La commande permet d'afficher les valeurs associées aux différentes variables systèmes.

Ainsi, la commande 'getconf -a ' listera l'ensemble des variables, tandis que 'getconf  VARIABLE' n'affichera que la valeur de 'Variable'.

 Exemple :

getconf -a

AIO_LISTIO_MAX: 4096
AIO_MAX: 4096
AIO_PRIO_DELTA_MAX: 20
ARG_MAX: 1048576
ATEXIT_MAX: 2048
BC_BASE_MAX: 99
BC_DIM_MAX: 2048
BC_SCALE_MAX: 99
BC_STRING_MAX: 2048
BOOT_DEVICE: hdisk1
CHARCLASS_NAME_MAX: 14
CHAR_BIT: 8
CHAR_MAX: 255
CHAR_MIN: 0
CHILD_MAX: 128
CLK_TCK: 100
COLL_WEIGHTS_MAX: 4
CS_PATH: /usr/bin:/usr/vac/bin
DELAYTIMER_MAX: 32
EXPR_NEST_MAX: 32
FILESIZEBITS: undefined
HARDWARE_BITMODE: 64
HOST_NAME_MAX: 256
INT_MAX: 2147483647
INT_MIN: -2147483648
IOV_MAX: 16
KERNEL_BITMODE: 64
LINE_MAX: 2048
LINK_MAX: 32767
LOGIN_NAME_MAX: 256
LONG_BIT: 32
LONG_MAX: 2147483647
LONG_MIN: -2147483648
MACHINE_ARCHITECTURE: chrp
MAXIMPL_LOGIN_NAME_MAX: 256
MAX_CANON: 256
MAX_INPUT: 512
MB_LEN_MAX: 4
MODEL_CLASS:
MODEL_CODE: 134217804
MP_CAPABLE: 1
MQ_OPEN_MAX: 32768
MQ_PRIO_MAX: 128
NAME_MAX: 255
NGROUPS_MAX: 128
NL_ARGMAX: 9
NL_LANGMAX: 14
NL_MAX: 10
NL_MSGMAX: 65535
NL_NMAX: 10
NL_SETMAX: 65535
NL_TEXTMAX: 8192
NZERO: 20
OPEN_MAX: 65534
PAGESIZE: 4096
PAGE_SIZE: 4096
PASS_MAX: 8
PATH: /usr/bin:/usr/vac/bin
PATH_MAX: 1024
PIPE_BUF: 32768
POSIX2_BC_BASE_MAX: 99
POSIX2_BC_DIM_MAX: 2048
POSIX2_BC_SCALE_MAX: 99
POSIX2_BC_STRING_MAX: 1000
POSIX2_CHARCLASS_NAME_MAX: 14
POSIX2_CHAR_TERM: 200112
POSIX2_COLL_WEIGHTS_MAX: 2
POSIX2_C_BIND: 200112
POSIX2_C_DEV: 200112
POSIX2_C_VERSION: 200112
POSIX2_EXPR_NEST_MAX: 32
POSIX2_FORT_DEV: -1
POSIX2_FORT_RUN: -1
POSIX2_LINE_MAX: 2048
POSIX2_LOCALEDEF: 200112
POSIX2_PBS: -1
POSIX2_PBS_ACCOUNTING: -1
POSIX2_PBS_CHECKPOINT: -1
POSIX2_PBS_LOCATE: -1
POSIX2_PBS_MESSAGE: -1
POSIX2_PBS_TRACK: -1
POSIX2_RE_DUP_MAX: 255
POSIX2_SW_DEV: -1
POSIX2_SYMLINKS: 8
POSIX2_UPE: 200112
POSIX2_VERSION: 200112
POSIX_ALLOC_SIZE_MIN: undefined
POSIX_REC_INCR_XFER_SIZE: undefined
POSIX_REC_MAX_XFER_SIZE: undefined
POSIX_REC_MIN_XFER_SIZE: undefined
POSIX_REC_XFER_ALIGN: undefined
POSIX_V6_ILP32_OFF32: 1
POSIX_V6_ILP32_OFF32_CFLAGS: -q32
POSIX_V6_ILP32_OFF32_LDFLAGS: -b32
POSIX_V6_ILP32_OFF32_LIBS: -lc -lpthread -lm
POSIX_V6_ILP32_OFFBIG: 1
POSIX_V6_ILP32_OFFBIG_CFLAGS: -q32 -D_LARGE_FILES -qlonglong
POSIX_V6_ILP32_OFFBIG_LDFLAGS: -b32
POSIX_V6_ILP32_OFFBIG_LIBS: -lc -lpthread -lm
POSIX_V6_LP64_OFF64: 1
POSIX_V6_LP64_OFF64_CFLAGS: -q64
POSIX_V6_LP64_OFF64_LDFLAGS: -b64
POSIX_V6_LP64_OFF64_LIBS: -lc -lpthread -lm
POSIX_V6_LPBIG_OFFBIG: 1
POSIX_V6_LPBIG_OFFBIG_CFLAGS: -q64
POSIX_V6_LPBIG_OFFBIG_LDFLAGS: -b64
POSIX_V6_LPBIG_OFFBIG_LIBS: -lc -lpthread -lm
POSIX_V6_WIDTH_RESTRICTED_ENVS: POSIX_V6_ILP32_OFF32
POSIX_V6_ILP32_OFFBIG
POSIX_V6_LP64_OFF64
POSIX_V6_LPBIG_OFFBIG
PTHREAD_DESTRUCTOR_ITERATIONS: 4
PTHREAD_KEYS_MAX: 450
PTHREAD_STACK_MIN: 8192
PTHREAD_THREADS_MAX: 512
PW_GROUPNAME_LEN: 256
PW_USERNAME_LEN: 256
REAL_MEMORY: 12582912
RE_DUP_MAX: 255
RTSIG_MAX: 8
SCHAR_MAX: 127
SCHAR_MIN: -128
SEM_NSEMS_MAX: 32768
SEM_VALUE_MAX: 32767
SHRT_MAX: 32767
SHRT_MIN: -32768
SIGQUEUE_MAX: 32
SSIZE_MAX: 2147483647
STREAM_MAX: 32767
SYMLINK_MAX: 255
SYMLOOP_MAX: 20
TIMER_MAX: 32
TMP_MAX: 16384
TTY_NAME_MAX: 1023
TZNAME_MAX: 255
UCHAR_MAX: 255
UINT_MAX: 4294967295
ULONG_MAX: 4294967295
USHRT_MAX: 65535
V6_ILP32_OFF32: 1
V6_ILP32_OFFBIG: 1
V6_LP64_OFF64: 1
V6_LPBIG_OFFBIG: 1
WORD_BIT: 32
XBS5_ILP32_OFF32: 1
XBS5_ILP32_OFF32_CFLAGS: -q32
XBS5_ILP32_OFF32_LDFLAGS: -b32
XBS5_ILP32_OFF32_LIBS: -lc -lpthread -lm
XBS5_ILP32_OFF32_LINTFLAGS:
XBS5_ILP32_OFFBIG: 1
XBS5_ILP32_OFFBIG_CFLAGS: -q32 -D_LARGE_FILES -qlonglong
XBS5_ILP32_OFFBIG_LDFLAGS: -b32
XBS5_ILP32_OFFBIG_LIBS: -lc -lpthread -lm
XBS5_ILP32_OFFBIG_LINTFLAGS: -D_LARGE_FILES -qlonglong
XBS5_LP64_OFF64: 1
XBS5_LP64_OFF64_CFLAGS: -q64
XBS5_LP64_OFF64_LDFLAGS: -b64
XBS5_LP64_OFF64_LIBS: -lc -lpthread -lm
XBS5_LP64_OFF64_LINTFLAGS: -D__64BIT__
XBS5_LPBIG_OFFBIG: 1
XBS5_LPBIG_OFFBIG_CFLAGS: -q64
XBS5_LPBIG_OFFBIG_LDFLAGS: -b64
XBS5_LPBIG_OFFBIG_LIBS: -lc -lpthread -lm
XBS5_LPBIG_OFFBIG_LINTFLAGS: -D__64BIT__
_CS_PATH: /usr/bin:/usr/vac/bin
_POSIX2_BC_BASE_MAX: 99
_POSIX2_BC_DIM_MAX: 2048
_POSIX2_BC_SCALE_MAX: 99
_POSIX2_BC_STRING_MAX: 1000
_POSIX2_CHARCLASS_NAME_MAX: 14
_POSIX2_CHAR_TERM: 200112
_POSIX2_COLL_WEIGHTS_MAX: 2
_POSIX2_C_BIND: 200112
_POSIX2_C_DEV: 200112
_POSIX2_C_VERSION: 200112
_POSIX2_EXPR_NEST_MAX: 32
_POSIX2_FORT_DEV: -1
_POSIX2_FORT_RUN: -1
_POSIX2_LINE_MAX: 2048
_POSIX2_LOCALEDEF: 200112
_POSIX2_PBS: -1
_POSIX2_PBS_ACCOUNTING: -1
_POSIX2_PBS_CHECKPOINT: -1
_POSIX2_PBS_LOCATE: -1
_POSIX2_PBS_MESSAGE: -1
_POSIX2_PBS_TRACK: -1
_POSIX2_RE_DUP_MAX: 255
_POSIX2_SW_DEV: -1
_POSIX2_SYMLINKS: undefined
_POSIX2_UPE: 200112
_POSIX2_VERSION: 200112
_POSIX_ADVISORY_INFO: 200112
_POSIX_AIO_LISTIO_MAX: 2
_POSIX_AIO_MAX: 1
_POSIX_ARG_MAX: 4096
_POSIX_ASYNCHRONOUS_IO: 200112
_POSIX_ASYNC_IO: undefined
_POSIX_BARRIERS: 200112
_POSIX_CHILD_MAX: 25
_POSIX_CHOWN_RESTRICTED: 0
_POSIX_CLOCKRES_MIN: 20000000
_POSIX_CLOCK_SELECTION: 200112
_POSIX_CPUTIME: 200112
_POSIX_DELAYTIMER_MAX: 32
_POSIX_FILE_LOCKING: undefined
_POSIX_FSYNC: 200112
_POSIX_HOST_NAME_MAX: 255
_POSIX_IPV6: 200112
_POSIX_JOB_CONTROL: 1
_POSIX_LINK_MAX: 8
_POSIX_LOGIN_NAME_MAX: 9
_POSIX_MAPPED_FILES: 200112
_POSIX_MAX_CANON: 255
_POSIX_MAX_INPUT: 255
_POSIX_MEMLOCK: 200112
_POSIX_MEMLOCK_RANGE: 200112
_POSIX_MEMORY_PROTECTION: 200112
_POSIX_MESSAGE_PASSING: 200112
_POSIX_MONOTONIC_CLOCK: 200112
_POSIX_MQ_OPEN_MAX: 8
_POSIX_MQ_PRIO_MAX: 32
_POSIX_MULTI_PROCESS: undefined
_POSIX_NAME_MAX: 14
_POSIX_NGROUPS_MAX: 8
_POSIX_NO_TRUNC: 0
_POSIX_OPEN_MAX: 20
_POSIX_PATH_MAX: 256
_POSIX_PIPE_BUF: 512
_POSIX_PRIORITIZED_IO: 200112
_POSIX_PRIORITY_SCHEDULING: 200112
_POSIX_PRIO_IO: undefined
_POSIX_RAW_SOCKETS: 200112
_POSIX_READER_WRITER_LOCKS: 200112
_POSIX_REALTIME_SIGNALS: 200112
_POSIX_REGEXP: 1
_POSIX_RE_DUP_MAX: undefined
_POSIX_RTSIG_MAX: 8
_POSIX_SAVED_IDS: 1
_POSIX_SEMAPHORES: 200112
_POSIX_SEM_NSEMS_MAX: 256
_POSIX_SEM_VALUE_MAX: 32767
_POSIX_SHARED_MEMORY_OBJECTS: 200112
_POSIX_SHELL: 1
_POSIX_SIGQUEUE_MAX: 32
_POSIX_SPAWN: 200112
_POSIX_SPIN_LOCKS: 200112
_POSIX_SPORADIC_SERVER: -1
_POSIX_SSIZE_MAX: 32767
_POSIX_SS_REPL_MAX: undefined
_POSIX_STREAM_MAX: 8
_POSIX_SYMLINK_MAX: 255
_POSIX_SYMLOOP_MAX: 8
_POSIX_SYNCHRONIZED_IO: 200112
_POSIX_SYNC_IO: undefined
_POSIX_THREADS: 200112
_POSIX_THREAD_ATTR_STACKADDR: 200112
_POSIX_THREAD_ATTR_STACKSIZE: 200112
_POSIX_THREAD_CPUTIME: 200112
_POSIX_THREAD_DESTRUCTOR_ITERATIONS: 4
_POSIX_THREAD_KEYS_MAX: 128
_POSIX_THREAD_PRIORITY_SCHEDULING: -1
_POSIX_THREAD_PRIO_INHERIT: -1
_POSIX_THREAD_PRIO_PROTECT: -1
_POSIX_THREAD_PROCESS_SHARED: 200112
_POSIX_THREAD_SAFE_FUNCTIONS: 200112
_POSIX_THREAD_SPORADIC_SERVER: -1
_POSIX_THREAD_THREADS_MAX: 64
_POSIX_TIMEOUTS: 200112
_POSIX_TIMERS: 200112
_POSIX_TIMER_MAX: 32
_POSIX_TRACE: -1
_POSIX_TRACE_EVENT_FILTER: -1
_POSIX_TRACE_EVENT_NAME_MAX: 30
_POSIX_TRACE_INHERIT: -1
_POSIX_TRACE_LOG: -1
_POSIX_TRACE_NAME_MAX: 8
_POSIX_TRACE_SYS_MAX: 8
_POSIX_TRACE_USER_EVENT_MAX: 32
_POSIX_TTY_NAME_MAX: 9
_POSIX_TYPED_MEMORY_OBJECTS: -1
_POSIX_TZNAME_MAX: 6
_POSIX_V6_ILP32_OFF32: 1
_POSIX_V6_ILP32_OFF32_CFLAGS: -q32
_POSIX_V6_ILP32_OFF32_LDFLAGS: -b32
_POSIX_V6_ILP32_OFF32_LIBS: -lc -lpthread -lm
_POSIX_V6_ILP32_OFFBIG: 1
_POSIX_V6_ILP32_OFFBIG_CFLAGS: -q32 -D_LARGE_FILES -qlonglong
_POSIX_V6_ILP32_OFFBIG_LDFLAGS: -b32
_POSIX_V6_ILP32_OFFBIG_LIBS: -lc -lpthread -lm
_POSIX_V6_LP64_OFF64: 1
_POSIX_V6_LP64_OFF64_CFLAGS: -q64
_POSIX_V6_LP64_OFF64_LDFLAGS: -b64
_POSIX_V6_LP64_OFF64_LIBS: -lc -lpthread -lm
_POSIX_V6_LPBIG_OFFBIG: 1
_POSIX_V6_LPBIG_OFFBIG_CFLAGS: -q64
_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: -b64
_POSIX_V6_LPBIG_OFFBIG_LIBS: -lc -lpthread -lm
_POSIX_V6_WIDTH_RESTRICTED_ENVS: POSIX_V6_ILP32_OFF32
POSIX_V6_ILP32_OFFBIG
POSIX_V6_LP64_OFF64
POSIX_V6_LPBIG_OFFBIG
_POSIX_VDISABLE: 255
_POSIX_VERSION: 200112
_REGEX_VERSION: undefined
_XBS5_ILP32_OFF32: 1
_XBS5_ILP32_OFF32_CFLAGS: -q32
_XBS5_ILP32_OFF32_LDFLAGS: -b32
_XBS5_ILP32_OFF32_LIBS: -lc -lpthread -lm
_XBS5_ILP32_OFF32_LINTFLAGS:
_XBS5_ILP32_OFFBIG: 1
_XBS5_ILP32_OFFBIG_CFLAGS: -q32 -D_LARGE_FILES -qlonglong
_XBS5_ILP32_OFFBIG_LDFLAGS: -b32
_XBS5_ILP32_OFFBIG_LIBS: -lc -lpthread -lm
_XBS5_ILP32_OFFBIG_LINTFLAGS: -D_LARGE_FILES -qlonglong
_XBS5_LP64_OFF64: 1
_XBS5_LP64_OFF64_CFLAGS: -q64
_XBS5_LP64_OFF64_LDFLAGS: -b64
_XBS5_LP64_OFF64_LIBS: -lc -lpthread -lm
_XBS5_LP64_OFF64_LINTFLAGS: -D__64BIT__
_XBS5_LPBIG_OFFBIG: 1
_XBS5_LPBIG_OFFBIG_CFLAGS: -q64
_XBS5_LPBIG_OFFBIG_LDFLAGS: -b64
_XBS5_LPBIG_OFFBIG_LIBS: -lc -lpthread -lm
_XBS5_LPBIG_OFFBIG_LINTFLAGS: -D__64BIT__
_XOPEN_CRYPT: 1
_XOPEN_ENH_I18N: 1
_XOPEN_IOV_MAX: 16
_XOPEN_LEGACY: -1
_XOPEN_NAME_MAX: 255
_XOPEN_PATH_MAX: 1024
_XOPEN_REALTIME: 200112
_XOPEN_REALTIME_THREADS: -1
_XOPEN_SHM: 1
_XOPEN_STREAMS: 1
_XOPEN_UNIX: 1
_XOPEN_VERSION: 600
_XOPEN_XCU_VERSION: 4
_XOPEN_XPG2: undefined
_XOPEN_XPG3: 1
_XOPEN_XPG4: 1

 

getconf Command

Purpose

Writes system configuration variable values to standard output.

Syntax

getconf [ -v specification ] [ SystemwideConfiguration | PathConfiguration PathName ] [ DeviceVariable DeviceName ]

getconf -a

Description

The getconf command, invoked with the SystemwideConfiguration parameter, writes the value of the variable, as specified by the SystemwideConfiguration parameter, to standard output.

The getconf command, invoked with the PathConfiguration and Pathname parameters, writes the value of the variable, as specified by the PathConfiguration parameter for the path specified by the PathName parameter, to standard output.

The getconf command, invoked with the -a flag, writes the values of all system configuration variables to standard output.

The getconf command, invoked with the DeviceVariable and DeviceName parameters, writes the value of the disk device name or location, for the device path specified by the DeviceName parameter, to the standard output.

If the specified variable is defined on the system and its value is described to be available from the confstr subroutine, the value of the specified variable is written in the following format:

"%s\n", 

Otherwise, if the specified variable is defined on the system, its value is written in the following format:

"%d\n", 

If the specified variable is valid but undefined on the system, the following is written to standard output:

"undefined\n"

If the variable name is invalid or an error occurs, a diagnostic message is written to the standard error.

Flags

-v specification Indicates a specific specification and version for which configuration variables are to be determined. If this flag is not specified, the values returned will correspond to an implementation default XBS5 conforming compilation environment.
-a Writes the values of all system configuration variables to standard output.

Parameters

PathName Specifies a path name for the PathConfiguration parameter.
SystemwideConfiguration Specifies a system configuration variable.
PathConfiguration Specifies a system path configuration variable.
DeviceName Specifies the path name of a device.
DeviceVariable Specifies a device variable.

When the symbol listed in the first column of the following table is used as the system_var operand, getconf will yield the same value as confstr when called with the value in the second column:

Note:
The _CS_AIX_ARCHITECTURE and _CS_AIX_BOOTDEV variables, used as parameters to confstr, are available only to the root user.

system_varconfstr Name Value
BOOT_DEVICE _CS_AIX_BOOTDEV
MACHINE_ARCHITECTURE _CS_AIX_ARCHITECTURE
MODEL_CODE _CS_AIX_MODEL_CODE
PATH _CS_PATH
XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILPBIG_OFF32_LINTFLAGS
XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS

Environment Variables

The following environment variables affect the execution of getconf:

LANG Provide a default value for the internationalisation variables that are unset or null. IfLANGis unset or null, the corresponding value from the implementation-dependent | default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
LC_CALL If set to a non-empty string value, override the values of all the other internationalisation variables.
LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments).
LC_MESSAGES Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
NLSPATH Determine the location of message catalogues for the processing of LC_MESSAGES.

Systemwide Configuration Variables

The SystemwideConfiguration parameter specifies system configuration variables whose values are valid throughout the system. There are two kinds of system configuration variables:

Systemwide Configuration Variables

Systemwide configuration variables contain the minimum values met throughout all portions of the system. The following list defines the systemwide configuration variables used with the getconf command:

_CS_PATH Value for the PATH environment variable used to find commands.
ARG_MAX Maximum length, in bytes, of the arguments for one of the exec subroutines, including environment data.
BC_BASE_MAX Maximum value allowed for the obase variable with the bc command.
BC_DIM_MAX Maximum number of elements permitted in an array by the bc command.
BC_SCALE_MAX Maximum value allowed for the scale variable with the bc command.
BC_STRING_MAX Maximum length of a string constant accepted by the bc command.
CHARCLASS_NAME_MAX Maximum number of bytes in a character class name.
CHAR_BIT Number of bits in a type character.
CHAR_MAX Maximum value of a type character.
CHAR_MIN Minimum value of a type character.
CHILD_MAX Maximum number of simultaneous processes for each real user ID.
CLK_TCK Number of clock ticks per second returned by the time subroutine.
COLL_WEIGHTS_MAX Maximum number of weights that can be assigned to an entry in the LC_COLLATE locale stanza in a locale-definition file.
CS_PATH Value of the PATH environment variable used to find commands.
EXPR_NEST_MAX Maximum number of expressions that can be nested within parentheses by the expr command.
INT_MAX Maximum value of a type int.
INT_MIN Minimum value of a type int.
LINE_MAX Maximum length, in bytes, of a command's input line (either standard input or another file) when the utility is described as processing text files. The length includes room for the trailing new-line character.
LONG_BIT Number of bits in a type long int.
LONG_MAX Maximum value of a type long int.
LONG_MIN Minimum value of a type long int.
MB_LEN_MAX Maximum number of bytes in a character for any supported locale.
NGROUPS_MAX Maximum number of simultaneous supplementary group IDs for each process.
NL_ARGMAX Maximum value of digit in calls to the printf and scanf subroutines.
NL_LANGMAX Maximum number of bytes in a LANG name.
NL_MSGMAX Maximum message number.
NL_NMAX Maximum number of bytes in an N-to-1 collation mapping.
NL_SETMAX Maximum set number.
NL_TEXTMAX Maximum number of bytes in a message string.
NZERO Default process priority.
OPEN_MAX Maximum number of files that one process can have open at one time.
PATH Sequence of colon-separated path prefixes used to find commands.
RE_DUP_MAX Maximum number of repeated occurrences of a regular expression permitted when using the interval-notation parameters, such as the m and n parameters with the ed command.
SCHAR_MAX Maximum value of a type signed char.
SCHAR_MIN Minimum value of a type signed char.
SHRT_MAX Maximum value of a type short.
SHRT_MIN Minimum value of a type short.
SSIZE_MAX Maximum value of an object of type ssize_t.
STREAM_MAX Number of streams that one process can have open at one time.
TMP_MAX Minimum number of unique path names generated by the tmpnam subroutine. Maximum number of times an application can reliably call the tmpnam subroutine.
TZNAME_MAX Maximum number of bytes supported for the name of a time zone (not the length of the TZ environment variable).
UCHAR_MAX Maximum value of a type unsigned char.
UINT_MAX Maximum value of a type unsigned int.
ULONG_MAX Maximum value of a type unsigned long int.
USHRT_MAX Maximum value of a type unsigned short int.
WORD_BIT Number of bits in a word or type int.
KERNEL_BITMODE Bit mode of the kernel, 32-bit or 64-bit.
REAL_MEMORY Real memory size.
HARDWARE_BITMODE Bit mode of the machine hardware, 32-bit or 64-bit.
MP_CAPABLE MP-capability of the machine.

System Standards Configuration Variables

System standards configuration variables contain the minimum values required by a particular system standard. The _POSIX_, POSIX2_, and _XOPEN_ prefixes indicate that the variable contains the minimum value for a system characteristic required by the POSIX 1003.1, POSIX 1003.2, and X/Open system standards, respectively. System standards are systemwide minimums that the system meets to support the particular system standard. Actual Configuration values may exceed these standards. The system standards configuration variables for the getconf command are defined as follows:

_POSIX_ARG_MAX Maximum length, in bytes, of the arguments for one of the exec subroutines, including environment data.
_POSIX_CHILD_MAX Maximum number of simultaneous processes for each real user ID.
_POSIX_JOB_CONTROL Value of 1 if the system supports job control.
_POSIX_LINK_MAX Maximum number of links to a single file.
_POSIX_MAX_CANON Maximum number of bytes in a terminal canonical input queue.
_POSIX_MAX_INPUT Maximum number of bytes allowed in a terminal input queue.
_POSIX_NAME_MAX Maximum number of bytes in a file name (not including terminating null).
_POSIX_NGROUPS_MAX Maximum number of simultaneous supplementary group IDs for each process.
_POSIX_OPEN_MAX Maximum number of files that one process can have open at one time.
_POSIX_PATH_MAX Maximum number of bytes in a path name.
_POSIX_PIPE_BUF Maximum number of bytes guaranteed to be atomic when writing to a pipe.
_POSIX_SAVED_IDS Value of 1. Each process has a saved set-user-ID and a saved set-group-ID.
_POSIX_SSIZE_MAX Maximum value that can be stored in an object of type ssize_t.
_POSIX_STREAM_MAX Number of streams that one process can have open at one time.
_POSIX_TZNAME_MAX Maximum number of bytes supported for the name of a time zone (not the length of the TZ environment variable).
_POSIX_VERSION Version of the POSIX 1 standard (C Language Binding) to which the operating system conforms.
_XOPEN_CRYPT Value of 1 if the system supports the X/Open Encryption Feature Group.
_XOPEN_ENH_I18N Value of 1 if the system supports the X/Open Enhanced Internationalisation Feature Group.
_XOPEN_SHM Value of 1 if the system supports the X/Open Shared Memory Feature Group.
_XOPEN_VERSION Version of the X/Open Portability Guide to which the operating system conforms.
_XOPEN_XCU_VERSION Version of the X/Open Commands and Utilities specification to which the operating system conforms.
_XOPEN_XPG2 Value of 1 if the system supports the X/Open Portability Guide, Volume 2, January 1987, XVS System Calls and Libraries, otherwise undefined.
_XOPEN_XPG3 Value of 1 if the system supports the X/Open Specification, February 1992, System Interfaces and Headers, Issue 3, otherwise undefined.
_XOPEN_XPG4 Value of 1 if the system supports the X/Open CAE Specification, July 1992, System Interfaces and Headers, Issue 4, otherwise undefined.
POSIX2_BC_BASE_MAX Maximum value allowed for the obase variable with the bc command.
POSIX2_BC_DIM_MAX Maximum number of elements permitted in an array by the bc command.
POSIX2_BC_SCALE_MAX Maximum value allowed for the scale variable with the bc command.
POSIX2_BC_STRING_MAX Maximum length of a string constant accepted by the bc command.
POSIX2_CHAR_TERM Value of 1 if the system supports at least one terminal type; otherwise it has the value -1.
POSIX2_COLL_WEIGHTS_MAX Maximum number of weights that can be assigned to an entry of the LC_COLLATE locale variable in a locale-definition file.
POSIX2_C_BIND Value of 1 if the system supports the C Language Binding Option from POSIX 2; otherwise, it has the value -1.
POSIX2_C_DEV Value of 1 if the system supports the C Language Development Utilities from POSIX 2; otherwise, it has the value -1.
POSIX2_C_VERSION Version of the POSIX 2 standard (C Language Binding) to which the operating system conforms.
POSIX2_EXPR_NEST_MAX Maximum number of expressions that can be nested within parentheses by the expr command.
POSIX2_FORT_DEV Value of 1 if the system supports the FORTRAN Development Utilities Option from POSIX 2; otherwise, it has the value -1.
POSIX2_FORT_RUN Value of 1 if the system supports the FORTRAN Runtime Utilities Option from POSIX 2; otherwise, it has the value -1.
POSIX2_LINE_MAX The maximum length, in bytes, of a command's input line (either standard input or another file) when the command is described as processing text files. The length includes room for the trailing new-line character.
POSIX2_LOCALEDEF Value of 1 if the system supports the creation of the locales by the localedef command; otherwise, it is undefined.
POSIX2_RE_DUP_MAX Maximum number of repeated occurrences of a regular expression permitted when using the interval-notation parameters, such as the m and n parameters with the ed command.
POSIX2_SW_DEV Value of 1 if the system supports the Software Development Utilities Option; otherwise, it has the value -1.
POSIX2_UPE Value of 1 if the system supports the User Portability Utilities Option from POSIX 2; otherwise, it as the value -1.
POSIX2_VERSION Date of approval of the most current version of the POSIX 2 standard that the system supports. The date is a six-digit number, with the first four digits signifying the year and the last two digits the month. Different versions of the POSIX 2 standard are periodically approved by the IEEE Standards Board, and the date of approval is used to distinguish between different versions.

System Path Configuration Variables

The PathConfiguration parameter specifies system path configuration variables whose values contain information about paths and path structures in the system. The following list defines these variables:

_POSIX_CHOWN_RESTRICTED The chown() subroutine is restricted to a process with appropriate privileges, and to changing the group ID of a file only to the effective group ID of the process or to one of its supplementary group IDs. If the PathName parameter refers to a directory, the value returned applies to any files except directories that exist or can be created within the directory.
_POSIX_NO_TRUNC Path names longer than the limit specified by the NAME_MAX variable will generate an error. If the PathName parameter refers to a directory, the value returned applies to file names within the directory.
_POSIX_VDISABLE Terminal special characters, defined in the termios.h file, can be disabled using this character value.
LINK_MAX Maximum number of links to a single file. If the PathName parameter refers to a directory, the value returned applies to the directory.
MAX_CANON Maximum number of bytes in a terminal canonical input line.
MAX_INPUT Maximum number of bytes for which space is available in a terminal input queue.
NAME_MAX Maximum number of bytes in a file name (not including terminating null). If the PathName parameter refers to a directory, the value returned applies to the file names within the directory.
PATH_MAX Maximum number of bytes in a path name, including the terminating null character. If the PathName parameter refers to a directory, the value returned is the maximum length of a relative path name when the specified directory is the working directory.
PIPE_BUF Maximum number of bytes guaranteed to be atomic when writing to a pipe. If the PathName parameter refers to a FIFO or a pipe, the value returned applies to the referenced object. If the PathName parameter refers to a directory, the value returned applies to any FIFO that exists or can be created within the directory.
DISK_PARTITION Physical partition size of the disk.
Note:
For the DISK_PARTITION path configuration variable, the PathName parameter must specify the complete path of the disk for which information is being queried.
DISK_SIZE Disk size in megabytes.
Note:
For the DISK_SIZE path configuration variable, the PathName parameter must specify the complete path of the disk for which information is being queried.

Device Variables

The DeviceVariable parameter indicates that the DeviceName parameter is the path of a device, such as /dev/hdisk0. Given the path of a disk, the getconf command displays the device name or location of the disk.

DISK_DEVNAME Device name or location of the device.

Exit Status

This command returns the following exit values:

0 The specified variable is valid and information about its current state was successfully written.
>0 An error occurred.
  1. To display the value of the ARG_MAX variable, type:
    getconf ARG_MAX
  2. To display the values of all system configuration variables, type:
     getconf -a
  3. To display the value of the NAME_MAX variable for the /usrdirectory, type:
     
    getconf NAME_MAX /usr
  4. The following sequence of shell commands shows how to handle unspecified results:
    if value=$(getconf PATH_MAX /usr)
    then
    if [ "$value" = "undefined" ]
    then
    echo
    The value of PATH_MAX in /usr is undefined.
    else

    The value of PATH_MAX in /usr is $value.
    fi
    else
    echo
    Error in the getconf command.
    fi

Examples

  1. To display the value of the ARG_MAXvariable, type:
    getconf ARG_MAX
  2. To display the value of the NAME_MAX variable for the /usrdirectory, type:
    getconf NAME_MAX /usr
  3. The following sequence of shell commands shows how to handle unspecified results:
    if value=$(getconf PATH_MAX /usr)
    then
    if [ "$value" = "undefined" ]
    then
    echo
    The value of PATH_MAX in /usr is undefined.
    else
    echo
    The value of PATH_MAX in /usr is $value.
    fi
    else
    echo Error in the getconf command.
    fi
  4. If the command:
    getconf _XBS5_ILP32_OFF32 

    does not write-1\norundefined\nto standard output, then commands of the form:

    getconf -v XBS5_ILP32_OFF32 ... 

    will determine values for configuration variables corresponding to theXBS5_ILP32_OFF32compilation environment specified in c89, Extended Description.

  5. If the command:
    getconf _XBS5_ILP32_OFFBIG 

    does not write-1\norundefined\nto standard output, then commands of the form:

    getconf -v XBS5_ILP32_OFFBIG ... 

    will determine values for configuration variables corresponding to theXBS5_ILP32_OFFBIGcompilation environment specified in c89, Extended Description.

  6. If the command:
    getconf _XBS5_LP64_OFF64 

    does not write-1\norundefined\n" to standard output, then commands of the | form:

    getconf -v XBS5_LP64_OFF64 ... 

    will determine values for configuration variables corresponding to the XBS5_LP64_OFF64 compilation environment specified in c89, Extended Description.

  7. If the command:
    getconf _XBS5_LPBIG_OFFBIG 

    does not write-1\norundefined\nto standard output, then commands of the form:

    getconf -v _XBS5_LPBIG_OFFBIG 

    will determine values for configuration variables corresponding to the XBS5_LPBIG_OFFBIG compilation environment specified in c89, Extended Description.

  8. To determine the disk size for diskhdisk0, as root user, enter the following:
    getconf DISK_SIZE /dev/hdisk0
  9. To determine the real memory size, enter the following:
    getconf REAL_MEMORY
  10. To determine if the machine hardware is 32-bit or 64-bit, enter the following:
    getconf HARDWARE_BITMODE
  11. To determine if the kernel is 32-bit or 64-bit, enter the following:
    getconf KERNEL_BITMODE
  12. To determine the device name or location of the diskhdisk0, enter the following:
    getconf DEVICE_NAME /dev/hdisk0

Files

/usr/bin/getconf Contains the getconf command.
/usr/include/limits.h Defines system configuration variables.
/usr/include/unistd.h Defines system configuration variables.
icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone