Skip site navigation (1)Skip section navigation (2)

FreeBSD Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
SYSCONF(3)	       FreeBSD Library Functions Manual		    SYSCONF(3)

     sysconf --	get configurable system	variables

     Standard C	Library	(libc, -lc)

     #include <unistd.h>

     sysconf(int name);

     This interface is defined by IEEE Std 1003.1-1988 (``POSIX.1'').  A far
     more complete interface is	available using	sysctl(3).

     The sysconf() function provides a method for applications to determine
     the current value of a configurable system	limit or option	variable.  The
     name argument specifies the system	variable to be queried.	 Symbolic con-
     stants for	each name value	are found in the include file <unistd.h>.
     Shell programmers who need	access to these	parameters should use the
     getconf(1)	utility.

     The available values are as follows:

	     The maximum bytes of argument to execve(2).

	     The maximum number	of simultaneous	processes per user id.

	     The frequency of the statistics clock in ticks per	second.

	     The maximum number	of elements in the I/O vector used by
	     readv(2), writev(2), recvmsg(2), and sendmsg(2).

	     The maximum number	of supplemental	groups.

	     The number	of processors configured.

	     The number	of processors currently	online.

	     One more than the maximum value the system	may assign to a	new
	     file descriptor.

	     The size of a system page in bytes.

	     Equivalent	to _SC_PAGESIZE.

	     The minimum maximum number	of streams that	a process may have
	     open at any one time.

	     The minimum maximum number	of types supported for the name	of a

	     Return 1 if job control is	available on this system, otherwise

	     Returns 1 if saved	set-group and saved set-user ID	is available,
	     otherwise -1.

	     The version of IEEE Std 1003.1 (``POSIX.1'') with which the sys-
	     tem attempts to comply.

	     The maximum ibase/obase values in the bc(1) utility.

	     The maximum array size in the bc(1) utility.

	     The maximum scale value in	the bc(1) utility.

	     The maximum string	length in the bc(1) utility.

	     The maximum number	of weights that	can be assigned	to any entry
	     of	the LC_COLLATE order keyword in	the locale definition file.

	     The maximum number	of expressions that can	be nested within
	     parenthesis by the	expr(1)	utility.

	     The maximum length	in bytes of a text-processing utility's	input

	     The maximum number	of repeated occurrences	of a regular expres-
	     sion permitted when using interval	notation.

	     The version of IEEE Std 1003.2 (``POSIX.2'') with which the sys-
	     tem attempts to comply.

	     Return 1 if the system's C-language development facilities	sup-
	     port the C-Language Bindings Option, otherwise -1.

	     Return 1 if the system supports the C-Language Development	Utili-
	     ties Option, otherwise -1.

	     Return 1 if the system supports at	least one terminal type	capa-
	     ble of all	operations described in	IEEE Std 1003.2	(``POSIX.2''),
	     otherwise -1.

	     Return 1 if the system supports the FORTRAN Development Utilities
	     Option, otherwise -1.

	     Return 1 if the system supports the FORTRAN Runtime Utilities
	     Option, otherwise -1.

	     Return 1 if the system supports the creation of locales, other-
	     wise -1.

	     Return 1 if the system supports the Software Development Utili-
	     ties Option, otherwise -1.

	     Return 1 if the system supports the User Portability Utilities
	     Option, otherwise -1.

	     Maximum number of I/O operations in a single list I/O call	sup-

	     Maximum number of outstanding asynchronous	I/O operations sup-

	     The maximum amount	by which a process can decrease	its asynchro-
	     nous I/O priority level from its own scheduling priority.

	     Maximum number of timer expiration	overruns.

	     The maximum number	of open	message	queue descriptors a process
	     may hold.

	     Maximum number of realtime	signals	reserved for application use.

	     Maximum number of semaphores that a process may have.

	     The maximum value a semaphore may have.

	     Maximum number of queued signals that a process may send and have
	     pending at	the receiver(s)	at any time.

	     Maximum number of timers per process supported.

	     Suggested initial value for the size of the group entry buffer.

	     Suggested initial value for the size of the password entry

	     Maximum length of a host name (not	including the terminating
	     null) as returned from the	gethostname() function.

	     Maximum length of a login name.

	     Minimum size in bytes of thread stack storage.

	     Maximum number of threads that can	be created per process.

	     Maximum length of terminal	device name.

	     Maximum number of symbolic	links that can be reliably traversed
	     in	the resolution of a pathname in	the absence of a loop.

	     Maximum number of functions that may be registered	with atexit().

	     An	integer	value greater than or equal to 4, indicating the ver-
	     sion of the X/Open	Portability Guide to which this	system con-

	     An	integer	value indicating the version of	the XCU	Specification
	     to	which this system conforms.

     These values also exist, but may not be standard:

	     Size of the kernel	cpuset.

	     The number	of pages of physical memory.  Note that	it is possible
	     that the product of this value and	the value of _SC_PAGESIZE will
	     overflow a	long in	some configurations on a 32bit machine.

     If	the call to sysconf() is not successful, -1 is returned	and errno is
     set appropriately.	 Otherwise, if the variable is associated with func-
     tionality that is not supported, -1 is returned and errno is not modi-
     fied.  Otherwise, the current variable value is returned.

     The sysconf() function may	fail and set errno for any of the errors spec-
     ified for the library function sysctl(3).	In addition, the following
     error may be reported:

     [EINVAL]		The value of the name argument is invalid.

     getconf(1), pathconf(2), confstr(3), sysctl(3)

     Except for	the fact that values returned by sysconf() may change over the
     lifetime of the calling process, this function conforms to	IEEE Std
     1003.1-1988 (``POSIX.1'').

     The sysconf() function first appeared in 4.4BSD.

     The value for _SC_STREAM_MAX is a minimum maximum,	and required to	be the
     same as ANSI C's FOPEN_MAX, so the	returned value is a ridiculously small
     and misleading number.

FreeBSD	10.2			April 26, 2013			  FreeBSD 10.2


Want to link to this manual page? Use this URL:

home | help