Determines the current value of a specified system limit or option.
Standard C Library (libc.a)
#include <unistd.h>
long int sysconf ( Name)
int Name;
The sysconf subroutine determines the current value of certain system parameters, the configurable system limits, or whether optional features are supported. The Name parameter represents the system variable to be queried.
Name | Specifies which system variable setting should be returned. The valid values for the Name parameter are defined in the limits.h, time.h, and unistd.h files and are described below: |
_SC_AIO_LISTIO_MAX | Maximum number of Input and Output operations that can be specified in a list Input and Output call. |
_SC_AIO_MAX | Maximum number of outstanding asynchronous Input and Output operations. |
_SC_ASYNCHRONOUS_IO | Implementation supports the Asynchronous Input and Output option. |
_SC_ARG_MAX | Specifies the maximum byte length of the arguments for one of the exec functions, including environment data. |
_SC_BC_BASE_MAX | Specifies the maximum number ibase and obase variables allowed by the bc command. |
_SC_BC_DIM_MAX | Specifies the maximum number of elements permitted in an array by the bc command. |
_SC_BC_SCALE_MAX | Specifies the maximum scale variable allowed by the bc command. |
_SC_BC_STRING_MAX | Specifies the maximum length of a string constant allowed by the bc command. |
_SC_CHILD_MAX | Specifies the number of simultaneous processes per real user ID. |
_SC_CLK_TCK | Indicates the clock-tick increment as defined by the CLK_TCK in the time.h file. |
_SC_COLL_WEIGHTS_MAX | Specifies the maximum number of weights that can be assigned to an entry of the LC_COLLATE keyword in the locale definition file. |
_SC_DELAYTIMER_MAX | Maximum number of Timer expiration overruns. |
_SC_EXPR_NEST_MAX | Specifies the maximum number of expressions that can be nested within parentheses by the expr command. |
_SC_JOB_CONTROL | If this symbol is defined, job control is supported. |
_SC_IOV_MAX | Specifies the maximum number of iovec structures one process has available for use with the readv and writev subroutines. |
_SC_LARGE_PAGESIZE | Size (in bytes) of a large-page. |
_SC_LINE_MAX | Specifies the maximum byte length of a command's input line (either standard input or another file) when a command is described as processing text files. The length includes room for the trailing new-line character. |
_SC_LOGIN_NAME_MAX | Maximum length of a login name. |
_SC_MQ_OPEN_MAX | Maximum number of open message queue descriptors. |
_SC_MQ_PRIO_MAX | Maximum number of message priorities. |
_SC_MEMLOCK | Implementation supports the Process Memory Locking option. |
_SC_MEMLOCK_RANGE | Implementation supports the Range Memory Locking option. |
_SC_MEMORY_PROTECTION | Implementation supports the Memory Protection option. |
_SC_MESSAGE_PASSING | Implementation supports the Message Passing option. |
_SC_NGROUPS_MAX | Specifies the maximum number of simultaneous supplementary group IDs per process. |
_SC_OPEN_MAX | Specifies the maximum number of files that one process can have open at any one time. |
_SC_PASS_MAX | Specifies the maximum number of significant characters in a password (not including the terminating null character). |
_SC_PASS_MAX | Maximum number of significant bytes in a password. |
_SC_PAGESIZE | Equivalent to _SC_PAGE_SIZE. |
_SC_PAGE_SIZE | Size in bytes of a page. |
_SC_PRIORITIZED_IO | Implementation supports the Prioritized Input and Output option. |
_SC_PRIORITY_SCHEDULING | Implementation supports the Process Scheduling option. |
_SC_RE_DUP_MAX | Specifies the maximum number of repeated occurrences of a regular expression permitted when using the \{ m, n \} interval notation. |
_SC_RTSIG_MAX | Maximum number of Realtime Signals reserved for applications use. |
_SC_REALTIME_SIGNALS | Implementation supports the Realtime Signals Extension option. |
_SC_SAVED_IDS | If this symbol is defined, each process has a saved set-user ID and set-group ID. |
_SC_SEM_NSEMS_MAX | Maximum number of Semaphores per process. |
_SC_SEM_VALUE_MAX | Maximum value a Semaphore may have. |
_SC_SEMAPHORES | Implementation supports the Semaphores option. |
_SC_SHARED_MEMORY_OBJECTS | Implementation supports the Shared Memory Objects option. |
_SC_SIGQUEUE_MAX | Maximum number of signals a process may send and have pending at any time. |
_SC_STREAM_MAX | Specifies the maximum number of streams that one process can have open simultaneously. |
_SC_SYNCHRONIZED_IO | Implementation supports the Synchronised Input and Output option. |
_SC_TIMER_MAX | Maximum number of per-process Timers. |
_SC_TIMERS | Implementation supports the Timers option. |
_SC_TZNAME_MAX | Specifies the maximum number of bytes supported for the name of a time zone (not of the TZ value). |
_SC_VERSION | Indicates that the version or revision number of the POSIX standard is implemented to indicate the 4-digit year and 2-digit month that the standard was approved by the IEEE Standards Board. This value is currently the long integer 198808. |
_SC_XBS5_ILP32_OFF32 | Implementation provides a C-language compilation environment with 32-bit int, long, pointer and off_t types. |
_SC_XBS5_ILP32_OFFBIG | Implementation provides a C-language compilation environment with 32-bit int, long and pointer types and an off_t type using at least 64 bits. |
_SC_XBS5_LP64_OFF64 | Implementation provides a C-language compilation environment with 32-bit int and 64-bit long, pointer and off_t types. |
_SC_XBS5_LPBIG_OFFBIG | Implementation provides a C-language compilation environment with an int type using at least 32 bits and long, pointer and off_t types using at least 64 bits. |
_SC_XOPEN_CRYPT | Indicates that the system supports the X/Open Encryption Feature Group. |
_SC_XOPEN_LEGACY | The implementation supports the Legacy Feature Group. |
_SC_XOPEN_REALTIME | The implementation supports the X/Open Realtime Feature Group. |
_SC_XOPEN_REALTIME_THREADS | The implementation supports the X/Open Realtime Threads Feature Group. |
_SC_XOPEN_ENH_I18N | Indicates that the system supports the X/Open Enhanced Internationalization Feature Group. |
_SC_XOPEN_SHM | Indicates that the system supports the X/Open Shared Memory Feature Group. |
_SC_XOPEN_VERSION | Indicates that the version or revision number of the X/Open standard is implemented. |
_SC_XOPEN_XCU_VERSION | Specifies the value describing the current version of the XCU specification. |
_SC_ATEXIT_MAX | Specifies the maximum number of register functions for the atexit subroutine. |
_SC_PAGE_SIZE | Specifies page-size granularity of memory. |
_SC_AES_OS_VERSION | Indicates OSF AES version. |
_SC_2_VERSION | Specifies the value describing the current version of POSIX.2. |
_SC_2_C_BIND | Indicates that the system supports the C Language binding option. |
_SC_2_C_CHAR_TERM | Indicates that the system supports at least one terminal type. |
_SC_2_C_DEV | Indicates that the system supports the C Language Development Utilities Option. |
_SC_2_C_VERSION | Specifies the value describing the current version of POSIX.2 with the C Language binding. |
_SC_2_FORT_DEV | Indicates that the system supports the FORTRAN Development Utilities Option. |
_SC_2_FORT_RUN | Indicates that the system supports the FORTRAN Development Utilities Option. |
_SC_2_LOCALEDEF | Indicates that the system supports the creation of locales. |
_SC_2_SW_DEV | Indicates that the system supports the Software Development Utilities Option. |
_SC_2_UPE | Indicates that the system supports the User Portability Utilities Option. |
_SC_NPROCESSORS_CONF | Number of processors configured. |
_SC_NPROCESSORS_ONLN | Number of processors online. |
_SC_THREAD_DATAKEYS_MAX | Maximum number of data keys that can be defined in a process. |
The values returned for the variables supported by the system do not change during the lifetime of the process making the call.
If the sysconf subroutine is successful, the current value of the system variable is returned. The returned value cannot be more restrictive than the corresponding value described to the application by the limits.h, time.h, or unistd.h file at compile time. The returned value does not change during the lifetime of the calling process. If the sysconf subroutine is unsuccessful, a value of -1 is returned.
If the Name parameter is invalid, a value of -1 is returned and the errno global variable is set to indicate the error. If the Name parameter is valid but is a variable not supported by the system, a value of -1 is returned, and the errno global variable is set to a value of EINVAL. If the system variable _SC_AIX_MP_CAPABLE is accessed by a non-root user, a value of -1 is returned and the errno global variable indicates the error
/usr/include/limits.h | Contains system-defined limits. |
The confstr subroutine, pathconf subroutine.
Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.