*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> sysconf (3)              



NAME    [Toc]    [Back]

       sysconf - Get configuration information at runtime

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       long sysconf(int name);

DESCRIPTION    [Toc]    [Back]

       sysconf()  provides  a  way for the application to determine values for
       system limits or options at runtime.

       The equivalent macros defined in <unistd.h> can only give  conservative
       values;	if  an application wants to take advantage of values which may
       change, a call to sysconf() can be made, which may yield  more  liberal

       For  getting  information  about  a particular file, see fpathconf() or

       The following values are supported for name.  First, the  POSIX.1  compatible

	      The  maximum  length  of	the  arguments to the exec() family of
	      functions; the corresponding macro is ARG_MAX.

	      The number of simultaneous processes per	user  id,  the	corresponding
 macro is _POSIX_CHILD_MAX.

	      The number of clock ticks per second; the corresponding macro is

	      The maximum number of streams that a process can	have  open  at
	      any time.  The corresponding POSIX macro is STREAM_MAX, the corresponding
 standard C macro is FOPEN_MAX.

	      The maximum number of bytes in a timezone name, the  corresponding
 macro is TZNAME_MAX.

	      The  maximum number of files that a process can have open at any
	      time, the corresponding macro is _POSIX_OPEN_MAX.

	      This indicates whether POSIX - style job control	is  supported,
	      the corresponding macro is _POSIX_JOB_CONTROL.

	      This  indicates  whether a process has a saved set-user-ID and a
	      saved set-group-ID; the corresponding macro is _POSIX_SAVED_IDS.

	      indicates  the  year and month the POSIX.1 standard was approved
	      in the format  YYYYMML;the  value  199009L  indicates  the  most
	      recent revision, 1990.

       Next, the POSIX.2 values:

	      indicates the maximum obase value accepted by the bc(1) utility;
	      the corresponding macro is BC_BASE_MAX.

	      indicates the maximum value of elements permitted in an array by
	      bc(1); the corresponding macro is BC_DIM_MAX.

	      indicates  the  maximum scale value allowed by bc(1); the corresponding
 macro is BC_SCALE_MAX.

	      indicates the maximum length of a string accepted by bc(1);  the
	      corresponding macro is BC_STRING_MAX.

	      indicates the maximum numbers of weights that can be assigned to
	      an entry of the LC_COLLATE order keyword in the  locale  definition
 file; the corresponding macro is COLL_WEIGHTS_MAX.

	      is  the maximum number of expressions which can be nested within
	      parentheses   by	 expr(1).    The   corresponding   macro    is

	      The maximum length of a utility's input line length, either from
	      standard input or from a file. This includes length for a trailing
 newline.  The corresponding macro is LINE_MAX.

	      The  maximum number of repeated occurrences of a regular expression
 when the interval notation \{m,n\} is used.	The  value  of
	      the corresponding macro is RE_DUP_MAX.

	      indicates  the  version of the POSIX.2 standard in the format of
	      YYYYMML.	The corresponding macro is POSIX2_VERSION.

	      indicates whether the POSIX.2 C language development  facilities
	      are supported.  The corresponding macro is POSIX2_C_DEV.

	      indicates  whether the POSIX.2 FORTRAN development utilities are
	      supported.  The corresponding macro is POSIX2_FORT_RUN.

	      indicates whether the POSIX.2 FORTRAN runtime utilities are supported.
  The corresponding macro is POSIX2_FORT_RUN.

	      indicates   whether   the   POSIX.2   creation  of  locates  via
	      localedef(1)  is	supported.    The   corresponding   macro   is

	      indicates  whether  the  POSIX.2	software development utilities
	      option is supported.  The corresponding macro is	POSIX2_SW_DEV.

       SUSv2 also lists

	      The size of a page (in bytes).

       These values also exist, but may not be standard.

	      The  number of pages of physical memory.	Note that it is possible
 for the product of this value and the value of _SC_PAGE_SIZE
	      to overflow.

	      The number of currently available pages of physical memory.

RETURN VALUE    [Toc]    [Back]

       The  value returned is the value of the system resource, 1 if a queried
       option is available, 0 if it is not, or	-1  on	error.	 The  variable
       errno is not set.

CONFORMING TO    [Toc]    [Back]

       POSIX.1, proposed POSIX.2

BUGS    [Toc]    [Back]

       It  is difficult to use ARG_MAX because it is not specified how much of
       the argument space for exec() is consumed  by  the  user's  environment

       Some  returned values may be huge; they are not suitable for allocating

       POSIX.2 is not yet an approved standard; the information in  this  manpage
 is subject to change.

SEE ALSO    [Toc]    [Back]

       bc(1), expr(1), locale(1), fpathconf(3), pathconf(3)

GNU				  1993-04-18			    SYSCONF(3)
[ Back ]
 Similar pages
Name OS Title
rc.config Tru64 Gets, sets, or deletes runtime configuration
rcmgr Tru64 Gets, sets, or deletes runtime configuration
vfs_unregister FreeBSD vfs configuration information
vfs_register FreeBSD vfs configuration information
vfsconf FreeBSD vfs configuration information
vfs_modevent FreeBSD vfs configuration information
rc.conf FreeBSD system configuration information
periodic.conf FreeBSD periodic job configuration information
ogated.conf Tru64 Contains configuration information for the ogated daemon
class_get_config_stats Tru64 return database configuration information
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service