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

FreeBSD Manual Pages

  
 
  

home | help
sysconf(2)		      System Calls Manual		    sysconf(2)

NAME
       sysconf() - get configurable system variables

SYNOPSIS
DESCRIPTION
       The  system  call provides a way	for applications to determine the cur-
       rent value of a configurable limit or variable.

       The name	argument represents the	system variable	being queried.

       The following table lists the configuration variables whose values  can
       be determined by	calling	and for	each variable, the associated value of
       the name	argument and the value returned:

       Variable		     Value for name		       Value Returned
--------------------------------------------------------------------------------------------
AES_OS_VERSION		 _SC_AES_OS_VERSION	  Version    number    of
						  OSF/AES OSC supported

AIO_LISTIO_MAX		 _SC_AIO_LISTIO_MAX	  Maximum  number  of aio
						  operations that can  be
						  specified   in  a  call
						  (see lio_listio(2))

AIO_MAX			 _SC_AIO_MAX		  Maximum number  of  aio
						  operations  that can be
						  queued at any	time (see
						  aio(5))

AIO_PRIO_DELTA_MAX	 _SC_AIO_PRIO_DELTA_MAX	  Maximum slowdown factor
						  that can  be	specified
						  in   the   field  of	a
						  structure (see aio(5))

ARG_MAX			 _SC_ARG_MAX		  Maximum total	length of
						  the  arguments  for  in
						  bytes, including  envi-
						  ronment    data    (see
						  exec(2))

ATEXIT_MAX		 _SC_ATEXIT_MAX		  Maximum number of func-
						  tions	 that can be reg-
						  istered    with    (see
						  atexit(3))

BC_BASE_MAX		 _SC_BC_BASE_MAX	  Maximum   ibase  (input
						  number radix)	and obase
						  (output  number  radix)
						  allowed by (see bc(1))

BC_DIM_MAX		 _SC_BC_DIM_MAX		  Maximum number of  ele-
						  ments	 in an array per-
						  mitted by (see bc(1))

BC_SCALE_MAX		 _SC_BC_SCALE_MAX	  Maximum  scale   factor
						  (number  of  digits  to
						  the right of the  deci-
						  mal  point)  allowed by
						  (see bc(1))

BC_STRING_MAX		 _SC_BC_STRING_MAX	  Maximum    length    of
						  strings allowed by (see
						  bc(1))

CHILD_MAX		 _SC_CHILD_MAX		  Maximum number  of  si-
						  multaneous	processes
						  per	user   ID    (see
						  fork(2))

CLK_TCK			 _SC_CLK_TCK		  Number  of clock inter-
						  vals	per  second   for
						  (see times(2))

CLOCKS_PER_SEC		 _SC_CLOCKS_PER_SEC	  Number  of  clock ticks
						  per  second  for   (see
						  clock(3C))

COLL_WEIGHTS_MAX	 _SC_COLL_WEIGHTS_MAX	  Maximum    number    of
						  weights that can be as-
						  signed  to  an entry of
						  the keyword in a  input
						  file	    (see      lo-
						  caledef(1M))

CPU_CHIP_TYPE		 _SC_CPU_CHIP_TYPE	  IPF:	CPUID Register	3
						  of  the  IPF	processor
						  identification   regis-
						  ters.	 See  the IPF ar-
						  chitecture   definition
						  for  this  platform for
						  the  meaning	of   each
						  bit.

CPU_KEYBITS1		 _SC_CPU_KEYBITS1	  IPF:	 CPUID Register	4
						  of  the  IPF	processor
						  identification   regis-
						  ters.	See the	 IPF  ar-
						  chitecture   definition
						  for this  platform  for
						  the	meaning	 of  each
						  bit.
						  PA:	Processor  Exten-
						  sions	(see below)

CPU_VERSION		 _SC_CPU_VERSION	  Version  of  CPU archi-
						  tecture (see below)

EXPR_NEST_MAX		 _SC_EXPR_NEST_MAX	  Maximum     parenthesis
						  nesting  level  for ex-
						  pressions (see expr(1))

HW_32_64_CAPABLE	 _SC_HW_32_64_CAPABLE	  Returns which	kernel is
						  supported  on	the hard-
						  ware.	  The  value  re-
						  turned  is  an encoding
						  which	 may  be   inter-
						  preted  using	the _SYS-
						  TEM_SUPPORTS_ILP32OS()
						  and	     _SYSTEM_SUP-
						  PORTS_LP64OS()   macros
						  defined   in	unistd.h.
						  Example:

						  long ret = sysconf(_SC_HW_32_64_CAPABLE);

						  if (_SYSTEM_SUPPORTS_ILP32OS(ret) != 0) {
						      /* system	supports 32-bit	OS */
						  }

						  if (_SYSTEM_SUPPORTS_LP64OS(ret) != 0) {
						      /* system	supports 64-bit	OS */
						  }

IO_TYPE			 _SC_IO_TYPE		  Type of I/O drivers the kernel  supports,
						  currently, only the value

KERNEL_BITS		 _SC_KERNEL_BITS	  Returns  the	number	of bits	used by	the
						  kernel for pointer and long  data  types.
						  Current values include 32 and	64.

LIBC_VERSION		 _SC_LIBC_VERSION	  The version of libc that is in use by	the
						  application that is requesting  this	in-
						  formation.  See below	for details.

LINE_MAX		 _SC_LINE_MAX		  Maximum  number of bytes in an input line
						  (including the newline) for POSIX.2 util-
						  ities

MQ_OPEN_MAX		 _SC_MQ_OPEN_MAX	  Maximum  number  of per-process open mes-
						  sage queue descriptors.

MQ_PRIO_MAX		 _SC_MQ_PRIO_MAX	  Maximum limit	for message priority.

NGROUPS_MAX		 _SC_NGROUPS_MAX	  Maximum number of simultaneous supplemen-
						  tary group IDs per process

OPEN_MAX		 _SC_OPEN_MAX		  Maximum  number of files that	one process
						  can have open	at one time

PAGE_SIZE		 _SC_PAGE_SIZE		  Kernel memory	page size

PASS_MAX		 _SC_PASS_MAX		  Maximum number of significant	bytes in  a
						  password

POSIX_FSYNC		 _SC_FSYNC		  Positive  if the File	Synchronization	op-
						  tion is supported (see fsync(2))

POSIX_JOB_CONTROL	 _SC_JOB_CONTROL	  Positive if the system supports POSIX	job
						  control; -1 otherwise

POSIX_PRIORITY_		 _SC_PRIORITY_		  Positive  if	the system supports POSIX.4
 SCHEDULING		  SCHEDULING		  priority scheduling; -1 otherwise

POSIX_REALTIME_SIGNALS	 _SC_REALTIME_SIGNALS	  Positive if the system  supports  POSIX.4
						  realtime signal extensions; -1 otherwise

POSIX_SAVED_IDS		 _SC_SAVED_IDS		  Positive if each process has a saved set-
						  user-ID and a	saved set-group-ID; -1 oth-
						  erwise

POSIX_SYNCHRONIZED_IO	 _SC_SYNCHRONIZED_IO	  Positive if the Synchronized IO option is
						  supported (see open(2))

POSIX_TIMERS		 _SC_TIMERS		  Positive if the system  supports  POSIX.4
						  clocks and timers; -1	otherwise

POSIX_VERSION		 _SC_VERSION		  Approval  date  of  the  POSIX.1 Standard
						  (such	 as  199009  for  POSIX.1-1990)	 to
						  which	 the  system  conforms.	 This value
						  indicates the	year  (first  four  digits)
						  and  month  (next  two  digits)  that	the
						  standard was approved	by the	IEEE  Stan-
						  dards	Board.

POSIX2_C_BIND		 _SC_2_C_BIND		  Equal	 to  1	if  the	 POSIX.2 C Language
						  Bindings Option is available through	the
						  utility; -1 otherwise

POSIX2_C_DEV		 _SC_2_C_DEV		  Equal	 to 1 if the POSIX.2 C Language	De-
						  velopment Utilities Option is	 supported;
						  -1 otherwise

POSIX2_C_VERSION	 _SC_2_C_VERSION	  Current version of the POSIX.2 C Language
						  Binding Option supported (same format	 as
						  -1 otherwise.

POSIX2_FORT_DEV		 _SC_2_FORT_DEV		  Equal	 to 1 if the POSIX.2 FORTRAN Devel-
						  opment Utilities Option is supported;	 -1
						  otherwise

POSIX2_FORT_RUN		 _SC_2_FORT_RUN		  Equal	to 1 if	the POSIX.2 Fortran Runtime
						  Utilities Option is supported; -1  other-
						  wise

POSIX2_LOCALEDEF	 _SC_2_LOCALEDEF	  Equal	to 1 if	locales	can be created with
						  the POSIX.2 localedef	utility; -1  other-
						  wise

POSIX2_SW_DEV		 _SC_2_SW_DEV		  Equal	to 1 if	the POSIX.2 Software Devel-
						  opment Utilities Option is supported;	 -1
						  otherwise

POSIX2_UPE		 _SC_2_UPE		  Equal	 to 1 if the POSIX.2 User Portabil-
						  ity Utilities	 Option	 is  supported;	 -1
						  otherwise

POSIX2_VERSION		 _SC_2_VERSION		  Current  version  of POSIX.2 (same format
						  as

POSIX_THREADS		 _SC_THREADS		  Positive if the  implementation  supports
						  POSIX	threads; -1 otherwise.

POSIX_THREAD_		 _SC_THREAD_		  Positive  if	the implementation supports
 ATTR_STACKADDR		  ATTR_STACKADDR	  the POSIX Thread Stack Address  Attribute
						  option; -1 otherwise.

POSIX_THREAD_		 _SC_THREAD_		  Positive  if	the implementation supports
 ATTR_STACKSIZE		  ATTR_STACKSIZE	  the POSIX Thread Stack Size Attribute	op-
						  tion;	-1 otherwise.

POSIX_THREAD_	      _SC_THREAD_	    Positive  if the imple-
 PRIORITY_SCHEDUL-     PRIORITY_SCHEDUL-    mentation supports	the
ING		      ING		    POSIX  Thread  Priority
					    Scheduling	option;	 -l
					    otherwise.

POSIX_THREAD_	      _SC_THREAD_	    Positive  if the imple-
 PRIO_INHERIT	       PRIO_INHERIT	    mentation supports	the
					    POSIX  Thread  Priority
					    Inheritance	option;	 -l
					    otherwise.

POSIX_THREAD_	      _SC_THREAD_	    Positive  if the imple-
 PRIO_PROTECT	       PRIO_PROTECT	    mentation supports	the
					    POSIX  Thread  Priority
					    Protection	option;	 -l
					    otherwise.

POSIX_THREAD_	      _SC_THREAD_PROCESS_   Positive if	the  imple-
 PROCESS_SHARED	       SHARED		    mentation  supports	the
					    POSIX  Thread  Process-
					    Shared  Synchronization
					    option; -l otherwise.

POSIX_THREAD_	      _SC_THREAD_SAFE_	    Positive if	the  imple-
 SAFE_FUNCTIONS	       FUNCTIONS	    mentation  supports	the
					    POSIX  Thread   Thread-
					    Safe  Functions option;
					    -l otherwise.

PROCESSOR_SET	      _SC_PSET_SUPPORT	    Positive if	the  imple-
					    mentation  supports	the
					    Processor	Set   Func-
					    tions; -l otherwise.

PTHREAD_	      _SC_THREAD_	    The	 number	of attempts
 DESTRUCTOR_	       DESTRUCTOR_	    made   to	destroy	  a
 ITERATIONS	       ITERATIONS	    pthread's	thread-spe-
					    cific  data	 values	 on
					    thread exit.

PTHREAD_KEYS_MAX      _SC_THREAD_	    The	 number	 of pthread
		       KEYS_MAX		    data keys per process.

PTHREAD_STACK_MIN     _SC_THREAD_	    Minimum size  in  bytes
		       STACK_MIN	    of	pthread	stack stor-
					    age.

PTHREAD_THREADS_MAX   _SC_THREAD_	    Maximum    number	 of
		       THREADS_MAX	    pthreads  that  can	 be
					    created per	process.

PROC_RSRC_MGR	      _SC_PROC_RSRC_MGR	    Equal to 1 if  the	op-
					    tional  HP	Process	Re-
					    source Management (PRM)
					    software  is  installed
					    and	configured; 0  oth-
					    erwise   (see   prmcon-
					    fig(1))

RE_DUP_MAX	      _SC_RE_DUP_MAX	    Maximum number  of	re-
					    peated occurrences of a
					    regular expression per-
					    mitted  when  using	the
					    interval notation  (see
					    regcomp(3C))

RTSIG_MAX	      _SC_RTSIG_MAX	    Maximum number of real-
					    time  signals  reserved
					    for	application use.

SECURITY_CLASS	      _SC_SECURITY_CLASS    (No	 DoD security level
					    supported)

SIGQUEUE_MAX	      _SC_SIGQUEUE_MAX	    Maximum    number	 of
					    queued  signals  that a
					    process  may  send	and
					    have pending at the	re-
					    ceiver(s) at any time.

STREAM_MAX	      _SC_STREAM_MAX	    Maximum number of stdio
					    streams	that	one
					    process can	 have  open
					    at one time

TIMER_MAX	      _SC_TIMER_MAX	    Maximum    number	 of
					    POSIX.4   timers	per
					    process,   if   POSIX.4
					    timers  are	 supported;
					    -1 otherwise

TZNAME_MAX	      _SC_TZNAME_MAX	    Maximum number of bytes
					    in a time zone name	for
					    the	 environment  vari-
					    able

XOPEN_CRYPT	      _SC_XOPEN_CRYPT	    Equal  to  1   if	the
					    X/Open  Encryption Fea-
					    ture  Group	  is   sup-
					    ported; -1 otherwise

XOPEN_ENH_I18N	      _SC_XOPEN_ENH_I18N    Equal   to	 1  if	the
					    X/Open Enhanced  Inter-
					    nationalization Feature
					    Group is supported;	 -1
					    otherwise

XOPEN_SHM	      _SC_XOPEN_SHM	    Equal   to	 1  if	the
					    X/Open  Shared   Memory
					    Feature  Group  is sup-
					    ported; -1 otherwise

XOPEN_VERSION	      _SC_XOPEN_VERSION	    Issue  number  of  sup-
					    ported

XBS5_ILP32_	      _SC_XBS5_ILP32_	    A  flag  which  denotes
 OFF32		       OFF32		    whether  and  are  sup-
					    ported  by confstr(3C).
					    A return  value  of	 -1
					    indicates  they are	not
					    supported.

XBS5_ILP32_	      _SC_XBS5_ILP32_	    A  flag  which  denotes
 OFFBIG		       OFFBIG		    whether  and  are  sup-
					    ported by  confstr(3C).
					    A  return  value  of -1
					    indicates they are	not
					    supported.

XBS5_LP64_	      _SC_XBS5_LP64_	    A  flag  which  denotes
 OFF64		       OFF64		    whether  and  are  sup-
					    ported  by confstr(3C).
					    A return  value  of	 -1
					    indicates  they are	not
					    supported.

XBS5_LPBIG_	      _SC_XBS5_LPBIG_	    A  flag  which  denotes
 OFFBIG		       OFFBIG		    whether  and  are  sup-
					    ported by  confstr(3C).
					    A  return  value  of -1
					    indicates they are	not
					    supported.
--------------------------------------------------------------------

       Some  of	 the  variables	 in the	table are defined as constants in (see
       limits(5)).  The	associated values of the name argument are defined in

       The possible values of the variable returned by and their meanings are:

		 Value				 Meaning
	   ----------------------------------------------------------------
	   CPU_PA_RISC1_0	HP Precision Architecture RISC Version 1.0
	   CPU_PA_RISC1_1	HP Precision Architecture RISC Version 1.1
	   CPU_PA_RISC2_0	HP Precision Architecture RISC Version 2.0
	   CPU_IA64_ARCHREV_0	HP IPF Architecture Version 0

       The function classifies cpuvers,	a value	of the	variable,  as  to  its
       processor family.

       The  availability of architecture specific instructions is indicated by
       the key bit data	returned by Upon successful completion,	the  data  re-
       turned  will  be	 the logical OR	of the defined values for the features
       supported.

       The possible values returned by and their meanings for PA platforms are
       shown in	the following table.

	    Return Value		Instruction Supported
	   ---------------------------------------------------------------
	   HARITH	     Halfword parallel add, subtract, and average
	   HSHIFT	     Halfword parallel shift-and-add

       The format of the value returned	by is as follows:

	      XXyyZZZZqN

       where

       XX     HP-UX major release number

       yy     HP-UX minor release number

       ZZZZ   Library-specific number

       q      0=32PA  1=64PA  2=32EM  3=64EM  4-9=Reserved

       N      0	  = archive library

	      1-9 = System V version of	shared library

RETURN VALUE
       Upon  successful	 completion,  returns the value	of the named variable.
       If the value of name is not valid, returns and sets to indicate the er-
       ror.  If	the variable corresponding to name is not defined, returns but
       does not	change

       returns positive	nonzero	if cpuvers is an HP PA-RISC processor; zero if
       not.

ERRORS
       If fails, the value of (see errno(2)) is	set to:

	      [EINVAL]	     The value of name is not valid.

EXAMPLES
       The  following  example determines the number of	times the system clock
       ticks each second:

		...

       The following example determines	if the current processor is an HP  PA-
       RISC machine:

		...

WARNINGS
       is implemented as a macro.

       Normally, the values returned from do not change	during the lifetime of
       the calling process.  However, the value	of the symbolic	 constant  and
       thus  the  value	of can vary under certain circumstances.  If either of
       the feature test	macros or is defined by	the programmer	prior  to  in-
       cluding	the  value  of is defined as in	conformance with POSIX.1-1988,
       FIPS 151-1, and XPG3.  Otherwise, the value of is defined as in confor-
       mance with POSIX.1-1990.

       Similarly, the value of the symbolic constant and thus the value	of can
       vary under certain circumstances.  If the feature test macro is defined
       by the programmer prior to including the	value of is defined as in con-
       formance	with XPG3.  Otherwise, the value of is defined as  in  confor-
       mance with XPG4.

       See stdsyms(5) for more information about these feature test macros.

       Any  application	that has a dependency on libdld.sl is a	potential user
       of both archived	and shared  libc.   Applications  that	comprise  both
       archived	 and  shared  components  where	 may  be invoked from both the
       archived	and shared components may get inconsistent return values from

AUTHOR
       was developed by	HP and POSIX.

       was developed by	HP.

SEE ALSO
       getconf(1), atexit(3),  exec(2),	 fork(2),  getrlimit(2),  pathconf(2),
       times(2),     clock(3C),	    regcomp(3C),     limits(5),	   stdsyms(5),
       thread_safety(5), unistd(5).

       HP Process Resource Manager: prmconfig(1) in

STANDARDS CONFORMANCE
								    sysconf(2)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | EXAMPLES | WARNINGS | AUTHOR | SEE ALSO | STANDARDS CONFORMANCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=sysconf&sektion=2&manpath=HP-UX+11.22>

home | help