 |
Index for Section 3 |
|
 |
Alphabetical listing for S |
|
 |
Bottom of page |
|
sysconf(3)
NAME
sysconf - Get configurable system variables
SYNOPSIS
#include <unistd.h>
long sysconf(
int name );
LIBRARY
Standard C Library (libc)
STANDARDS
Interfaces documented on this reference page conform to industry standards
as follows:
sysconf(): POSIX.1c, XSH4.2
Refer to the standards(5) reference page for more information about
industry standards and associated tags.
PARAMETERS
name
Specifies the system variable to be queried.
DESCRIPTION
The sysconf() function provides a method for the application to determine
the current value of a configurable system limit or whether optional
features are supported.
The following is a list of system variables that are returned by the
sysconf() function, and the symbolic constants (shown in parentheses) that
are the corresponding values used for the name parameter. The variables
come from either the limits.h, unistd.h, or time.h (for CLK_TCK) header
file and the symbolic constants are defined in unistd.h.
_AES_OS_VERSION (_SC_AES_OS_VERSION)
[Tru64 UNIX] Integer value indicating the revision of the AES to which
the implementation is compliant.
ARG_MAX (_SC_ARG_MAX)
Maximum length, in bytes, of the arguments for one of the exec
functions, including environment data.
ATEXIT_MAX (_SC_ATEXIT_MAX)
[XSH4.2] Maximum number of functions that can be registered with
atexit() per process. (_SC_ATEXIT_MAX)
BC_BASE_MAX (_SC_BC_BASE_MAX)
Maximum value allowed for the obase variable with the bc command.
BC_DIM_MAX (_SC_BC_DIM_MAX)
Maximum number of elements permitted in an array by the bc command.
BC_SCALE_MAX (_SC_BC_SCALE_MAX)
Maximum value allowed for the scale variable with the bc command.
BC_STRING_MAX (_SC_BC_STRING_MAX)
Maximum length of string constants accepted by the bc command.
CHILD_MAX (_SC_CHILD_MAX)
Maximum number of simultaneous processes for each real user ID.
CLK_TCK (_SC_CLK_TCK)
Number of clock ticks per second. The value of CLK_TCK may be variable,
and it should not be assumed that CLK_TCK is a compile-time constant.
COLL_WEIGHTS_MAX (_SC_COLL_WEIGHTS_MAX)
Maximum number of weights that can be assigned to an entry in the
LC_COLLATE locale-dependent information in a locale-definition file
EXPR_NEST_MAX (_SC_EXPR_NEST_MAX)
Maximum number of expressions that can be nested within parentheses by
the expr command.
IOV_MAX (_SC_IOV_MAX)
[XSH4.2] Maximum number of iovec structures that one process has
available for use with readv() or writev().
LINE_MAX (_SC_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 newline character.
NGROUPS_MAX (_SC_NGROUPS_MAX)
Maximum number of simultaneous supplementary group IDs for each
process.
OPEN_MAX (_SC_OPEN_MAX)
Maximum number of files that one process can have open at one time.
[Tru64 UNIX] In some cases, the per-process soft descriptor limit is
returned instead of the OPEN_MAX value.
PAGESIZE (_SC_PAGESIZE)
[XSH4.2] Page size granularity for memory regions.
PAGE_SIZE (_SC_PAGE_SIZE)
[XSH4.2] Page size granularity for memory regions.
PASS_MAX (_SC_PASS_MAX)
Maximum number of characters returned by getpass(), (not including the
terminating null character).
_POSIX_JOB_CONTROL (_SC_JOB_CONTROL)
The variable has a value of 1 if the system supports job control;
otherwise, -1 is returned.
_POSIX_REENTRANT_FUNCTIONS (_SC_REENTRANT_FUNCTIONS)
[POSIX] The variable has a value of 1 if the system supports POSIX
reentrant functions; otherwise, -1 is returned.
_POSIX_SAVED_IDS (_SC_SAVED_IDS)
The variable has a value of 1 if each process has a saved set user ID
and a saved set group ID; otherwise, -1 is returned.
_POSIX_THREADS (_SC_THREADS)
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Threads option; otherwise, -1 is returned.
_POSIX_THREAD_ATTR_STACKSIZE (_SC_THREAD_ATTR_STACKSIZE)
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Threads Stack Size attribute option; otherwise, -1 is returned.
_POSIX_VERSION (_SC_VERSION)
Date of approval of the most current version of the POSIX 1 standard
that the system supports. The date is a 6-digit number, with the first
4 digits signifying the year and the last 2 digits the month. Different
versions of the POSIX 1 standard are periodically approved by the IEEE
Standards Board, and the date of approval is used to distinguish
between different versions. If _POSIX_VERSION is defined, it is
returned; otherwise, -1 is returned.
_POSIX2_C_BIND (_SC_2_C_BIND)
The variable has a value of 1 if the system supports the C language
binding from POSIX 2; otherwise, -1 is returned.
_POSIX2_C_DEV (_SC_2_C_DEV)
The variable has a value of 1 if the system supports the optional C
Language Development Utilities from POSIX 2; otherwise, -1 is returned.
_POSIX2_C_VERSION (_SC_2_C_VERSION)
Date of approval of the most current version of the POSIX 2 ISO C
standard that the system supports. The date is a 6-digit number, with
the first 4 digits signifying the year and the last 2 digits the month.
Different versions of the POSIX 2 ISO C standard are periodically
approved by the IEEE Standards Board, and the date of approval is used
to distinguish between different versions.
_POSIX2_CHAR_TERM (_SC_2_CHAR_TERM)
The variable has a value of 1 if the system supports at least one
terminal; otherwise -1 is returned.
_POSIX2_FORT_DEV (_SC_2_FORT_DEV)
The variable has a value of 1 if the system supports the FORTRAN
Development Utilities Option from POSIX 2; otherwise, -1 is returned.
_POSIX2_FORT_RUN (_SC_2_FORT_RUN)
The variable has a value of 1 if the system supports the FORTRAN
Runtime Utilities Option from POSIX 2; otherwise, -1 is returned.
_POSIX2_LOCALEDEF (_SC_2_LOCALEDEF)
The variable has a value of 1 if the system supports the creation of
new locales with the localedef command; otherwise, -1 is returned.
_POSIX2_SW_DEV (_SC_2_SW_DEV)
The variable has a value of 1 if the system supports the Software
Development Utilities Option from POSIX 2; otherwise, -1 is returned.
_POSIX2_UPE (_SC_2_UPE)
The variable has a value of 1 if the system supports the User
Portability Environment Option from POSIX 2; otherwise, -1 is returned.
_POSIX2_VERSION (_SC_2_VERSION)
Date of approval of the most current version of the POSIX 2 standard
that the system supports. The date is a 6-digit number, with the first
4 digits signifying the year and the last 2 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.
RE_DUP_MAX (_SC_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.
_SC_AIO_MAX
[POSIX] Maximum number of outstanding asynchronous I/O operations.
_SC_AIO_LISTIO_MAX
[POSIX] Maximum number of I/O operations in a single list I/O call.
_SC_ASYNCHRONOUS_IO
[POSIX] The variable has a value of 1 if the system supports the POSIX
Asynchronous Input and Output option; otherwise -1 is returned.
_SC_DELAYTIMER_MAX
[POSIX] Maximum number of timer expiration overruns.
_SC_FSYNC
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 File Synchronization option; otherwise -1 is returned.
_SC_GETGR_R_SIZE_MAX
[POSIX] Maximum size of data buffers for getgrgid_r and getgrnam_r
functions.
_SC_GETPW_R_SIZE_MAX
[POSIX] Maximum size of data buffers for getpwuid_r and getpwnam_r
functions.
_SC_LISTIO_AIO_MAX or _SC_AIO_LISTIO_MAX
[POSIX] Maximum number of I/O operations in a single list I/O call.
Avoid using _SC_LISTIO_AIO_MAX, which is only retained for backward
compatibility. Use only the CAE-UNIX98-compliant _SC_AIO_LISTIO_MAX
operation.
_SC_LOGIN_NAME_MAX
Size in bytes of storage required for a login name, including the
terminating null character.
_SC_MAPPED_FILES
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Memory Mapped Files option; otherwise -1 is returned.
_SC_MEMLOCK
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Process Memory Locking option; otherwise -1 is returned.
_SC_MEMLOCK_RANGE
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Range Memory Locking option; otherwise -1 is returned.
_SC_MEMORY_PROTECTION
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Memory Protection option; otherwise -1 is returned.
_SC_MESSAGE_PASSING
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Message Passing option; otherwise -1 is returned.
_SC_MQ_OPEN_MAX
[POSIX] Maximum number of open message queue descriptors a process may
hold.
_SC_MQ_PRIO_MAX
[POSIX] Maximum number of message priorities.
_SC_PRIORITIZED_IO
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Prioritized Input and Output option; otherwise -1 is returned.
_SC_PRIORITY_SCHEDULING
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Process Scheduling option; otherwise -1 is returned.
_SC_REALTIME_SIGNALS
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Realtime Signals Extension option; otherwise -1 is returned.
_SC_RTSIG_MAX
[POSIX] Maximum number of realtime signals reserved for application
use.
_SC_SHARED_MEMORY_OBJECTS
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Shared Memory Objects option; otherwise -1 is returned.
_SC_SEMAPHORES
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Semaphores option; otherwise -1 is returned.
_SC_SEM_NSEMS_MAX
[POSIX] Maximum number of semaphores that a process may have.
_SC_SEM_VALUE_MAX
[POSIX] Maximum value a semaphore can have.
_SC_SIGQUEUE_MAX
[POSIX] Maximum number of queued signals that a process may send and
have pending at the receiver(s) at any time.
_SC_SYNCHRONIZED_IO
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Synchronized Input and Output option; otherwise -1 is returned.
_SC_THREAD_ATTR_STACKADDR
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Thread Stack Address Attribute option; otherwise -1 is
returned.
_SC_THREAD_DESTRUCTOR_ITERATIONS
[POSIX] Maximum number of attempts made to destroy a thread's thread-
specific data values on thread exit.
_SC_THREAD_KEYS_MAX
[POSIX] Maximum number of data keys that can be created per-process.
_SC_THREAD_PRIO_INHERIT
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Priority Inheritance option; otherwise -1 is returned.
_SC_THREAD_PRIO_PROTECT
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Priority Protection option; otherwise -1 is returned.
_SC_THREAD_PRIORITY_SCHEDULING
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Thread Execution Scheduling option; otherwise -1 is returned.
_SC_THREAD_PROCESS_SHARED
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Process-Shared Synchronization option; otherwise -1 is
returned.
_SC_THREAD_SAFE_FUNCTIONS
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Thread-Safe Functions option; otherwise -1 is returned.
_SC_THREAD_STACK_MIN
[POSIX] Minimum size in bytes of thread stack storage.
_SC_THREAD_THREADS_MAX
[POSIX] Maximum number of threads that can be created per process.
_SC_TIMER_MAX
[POSIX] Maximum number of timers per process.
_SC_TIMERS
[POSIX] The variable has a value of 1 if the system supports the
POSIX.1 Timers option; otherwise -1 is returned.
_SC_TTY_NAME_MAX
Maximum length of terminal device name.
STREAM_MAX (_SC_STREAM_MAX)
Number of streams that one process can have open at one time.
TZNAME_MAX (_SC_TZNAME_MAX)
Maximum number of bytes supported for the name of a time zone (not the
length of the TZ environmental variable).
_XOPEN_CRYPT (_SC_XOPEN_CRYPT)
The variable has a value of 1 if the system supports the X/Open
Encryption Feature Group; otherwise, -1 is returned.
_XOPEN_ENH_I18N (_SC_XOPEN_ENH_I18N)
The variable has a value of 1 if the system supports the X/Open
Enhanced Internationalization Feature Group; otherwise, -1 is returned.
_XOPEN_SHM (_SC_XOPEN_SHM)
The variable has a value of 1 if the system supports the X/Open Shared
Memory Feature Group; otherwise, -1 is returned.
_XOPEN_UNIX (_SC_XOPEN_UNIX)
[XSH4.2] The variable has a value of 1 if the system supports the
X/Open UNIX Feature Group; otherwise, -1 is returned.
_XOPEN_VERSION (_SC_XOPEN_VERSION)
Integer indicating the most current version of the X/Open standard that
the system supports.
_XOPEN_XCU_VERSION (_SC_XOPEN_XCU_VERSION)
Integer indicating the most current version of the X/Open standard for
Commands and Utilities that the system supports.
[Tru64 UNIX] The following values of name are supported as part of the
System V Environment for compliance with the System V Release 4.0 with
Multiprocessing (SVR4.0MP) standards:
_SC_NPROCESSORS_CONF
Number of processors in the system.
_SC_NPROCESSORS_ONLN
Number of processors currently online.
RETURN VALUES
If the name parameter is an invalid value, the sysconf() function returns a
value of -1, and sets errno to indicate the error. If the variable
corresponding to name is undefined, the sysconf() function returns a value
of -1 without changing the value of errno.
ERRORS
If the following condition occurs, the sysconf() function sets errno to the
corresponding value:
[EINVAL]
The value of the name parameter is invalid.
SEE ALSO
Functions: pathconf(2)
Commands: getconf(1)
Standards: standards(5)
 |
Index for Section 3 |
|
 |
Alphabetical listing for S |
|
 |
Top of page |
|