unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-5.10)
Page:
Section:
Apropos / Subsearch:
optional field

getconf(1)                       User Commands                      getconf(1)



NAME
       getconf - get configuration values

SYNOPSIS
       /usr/bin/getconf [-v specification] system_var

       /usr/bin/getconf [-v specification] path_var pathname

       /usr/bin/getconf -a

       /usr/xpg4/bin/getconf [-v specification] system_var

       /usr/xpg4/bin/getconf [-v specification] path_var pathname

       /usr/xpg4/bin/getconf -a

       /usr/xpg6/bin/getconf [-v specification] system_var

       /usr/xpg6/bin/getconf [-v specification] path_var pathname

       /usr/xpg6/bin/getconf -a

DESCRIPTION
       In the first synopsis form, the getconf utility will write to the stan-
       dard output the value of  the  variable  specified  by  system_var,  in
       accordance with specification if the -v option is used.

       In  the second synopsis form, getconf will write to the standard output
       the value of the variable specified by path_var for the path  specified
       by pathname, in accordance with specification if the -v option is used.

       In  the  third  synopsis form, config will write to the standard output
       the names of the current system configuration variables.

       The value of each configuration variable will be determined  as  if  it
       were  obtained  by  calling the function from which it is defined to be
       available. The value will reflect conditions in the  current  operating
       environment.

OPTIONS
       The following options are supported:

       -a                      Writes the names of the current system configu-
                               ration variables to the standard output.



       -v specification        Gives  the  specification  which  governs   the
                               selection  of  values  for  configuration vari-
                               ables.



OPERANDS
       The following operands are supported:

       path_var        A name of  a  configuration  variable  whose  value  is
                       available  from  the  pathconf(2)  function. All of the
                       values in the following table are supported:



       tab();   lw(1.833333i)    lw(1.833333i)    lw(1.833333i).     LINK_MAX-
       NAME_MAX_POSIX_CHOWN_RESTRICTED        MAX_CANONPATH_MAX_POSIX_NO_TRUNC
       MAX_INPUTPIPE_BUF_POSIX_VDISABLE


       pathname        A  path  name  for  which  the  variable  specified  by
                       path_var is to be determined.



       system_var      A  name  of  a  configuration  variable  whose value is
                       available from confstr(3C) or sysconf(3C). All  of  the
                       values in the following table are supported:



       tab();       lw(2.750000i)      lw(2.750000i).       ARG_MAXBC_BASE_MAX
       BC_DIM_MAXBC_SCALE_MAX BC_STRING_MAXCHAR_BIT CHARCLASS_NAME_MAXCHAR_MAX
       CHAR_MINCHILD_MAX      CLK_TCKCOLL_WEIGHTS_MAX     CS_PATHEXPR_NEST_MAX
       HOST_NAME_MAXINT_MAX    INT_MINLFS64_CFLAGS     LFS64_LDFLAGSLFS64_LIBS
       LFS64_LINTFLAGSLFS_CFLAGS   LFS_LDFLAGSLFS_LIBS   LFS_LINTFLAGSLINE_MAX
       LONG_BITLONG_MAX   LONG_MINMB_LEN_MAX   NGROUPS_MAXNL_ARGMAX   NL_LANG-
       MAXNL_MSGMAX       NL_NMAXNL_SETMAX      NL_TEXTMAXNZERO      OPEN_MAX-
       POSIX2_BC_BASE_MAX                 POSIX2_BC_DIM_MAXPOSIX2_BC_SCALE_MAX
       POSIX2_BC_STRING_MAXPOSIX2_C_BIND          POSIX2_C_DEVPOSIX2_CHAR_TERM
       POSIX2_COLL_WEIGHTS_MAXPOSIX2_C_VERSION           POSIX2_EXPR_NEST_MAX-
       POSIX2_FORT_DEV     POSIX2_FORT_RUNPOSIX2_LINE_MAX    POSIX2_LOCALEDEF-
       POSIX2_RE_DUP_MAX POSIX2_SW_DEVPOSIX2_SYMLINKS POSIX2_UPEPOSIX2_VERSION
       POSIX_ALLOC_SIZE_MINPOSIX_REC_INCR_XFER_SIZE
       POSIX_REC_MAX_XFER_SIZEPOSIX_REC_MIN_XFER_SIZE    POSIX_REC_XFER_ALIGN-
       POSIX_V6_ILP32_OFF32
       POSIX_V6_ILP32_OFF32_CFLAGSPOSIX_V6_ILP32_OFF32_LDFLAGS
       POSIX_V6_ILP32_OFF32_LIBSPOSIX_V6_ILP32_OFFBIG      POSIX_V6_ILP32_OFF-
       BIG_CFLAGSPOSIX_V6_ILP32_OFFBIG_LDFLAGS      POSIX_V6_ILP32_OFFBIG_LIB-
       SPOSIX_V6_LP64_OFF64
       POSIX_V6_LP64_OFF64_CFLAGSPOSIX_V6_LP64_OFF64_LDFLAGS
       POSIX_V6_LP64_OFF64_LIBSPOSIX_V6_LPBIG_OFFBIG       POSIX_V6_LPBIG_OFF-
       BIG_CFLAGSPOSIX_V6_LPBIG_OFFBIG_LDFLAGS      POSIX_V6_LPBIG_OFFBIG_LIB-
       SPOSIX_V6_WIDTH_RESTRICTED_ENVS                  SYMLINK_MAXSYMLOOP_MAX
       _POSIX2_BC_BASE_MAX_POSIX2_BC_DIM_MAX
       _POSIX2_BC_SCALE_MAX_POSIX2_BC_STRING_MAX                 _POSIX2_CHAR-
       CLASS_NAME_MAX_POSIX2_CHAR_TERM  _POSIX2_COLL_WEIGHTS_MAX_POSIX2_C_BIND
       _POSIX2_C_DEV_POSIX2_EXPR_NEST_MAX     _POSIX2_FORT_DEV_POSIX2_FORT_RUN
       _POSIX2_LINE_MAX_POSIX2_LOCALEDEF     _POSIX2_PBS_POSIX2_PBS_ACCOUNTING
       _POSIX2_PBS_CHECKPOINT_POSIX2_PBS_LOCATE               _POSIX2_PBS_MES-
       SAGE_POSIX2_PBS_TRACK                  _POSIX2_RE_DUP_MAX_POSIX2_SW_DEV
       _POSIX2_UPE_POSIX2_VERSION    _POSIX_ADVISORY_INFO_POSIX_AIO_LISTIO_MAX
       _POSIX_AIO_MAX_POSIX_ARG_MAX             _POSIX_ASYNC_IO_POSIX_BARRIERS
       _POSIX_CHILD_MAX_POSIX_CLOCKRES_MIN                 _POSIX_CLOCK_SELEC-
       TION_POSIX_CPUTIME            _POSIX_DELAYTIMER_MAX_POSIX_HOST_NAME_MAX
       _POSIX_IPV6_POSIX_JOB_CONTROL      _POSIX_LINK_MAX_POSIX_LOGIN_NAME_MAX
       _POSIX_MAX_CANON_POSIX_MAX_INPUT                           _POSIX_MONO-
       TONIC_CLOCK_POSIX_MQ_OPEN_MAX         _POSIX_MQ_PRIO_MAX_POSIX_NAME_MAX
       _POSIX_NGROUPS_MAX_POSIX_OPEN_MAX        _POSIX_PATH_MAX_POSIX_PIPE_BUF
       _POSIX_PRIO_IO_POSIX_RAW_SOCKETS  _POSIX_READER_WRITER_LOCKS_POSIX_REG-
       EXP                                   _POSIX_RE_DUP_MAX_POSIX_RTSIG_MAX
       _POSIX_SAVED_IDS_POSIX_SEM_NSEMS_MAX   _POSIX_SEM_VALUE_MAX_POSIX_SHELL
       _POSIX_SIGQUEUE_MAX_POSIX_SPAWN _POSIX_SPIN_LOCKS_POSIX_SPORADIC_SERVER
       _POSIX_SSIZE_MAX_POSIX_SS_REPL_MAX  _POSIX_STREAM_MAX_POSIX_SYMLINK_MAX
       _POSIX_SYMLOOP_MAX_POSIX_SYNC_IO              _POSIX_THREAD_ATTR_STACK-
       ADDR_POSIX_THREAD_ATTR_STACKSIZE
       _POSIX_THREAD_CPUTIME_POSIX_THREAD_DESTRUCTOR_ITERATIONS
       _POSIX_THREAD_KEYS_MAX_POSIX_THREAD_PRIORITY_SCHEDULING
       _POSIX_THREAD_PRIO_INHERIT_POSIX_THREAD_PRIO_PROTECT
       _POSIX_THREAD_PROCESS_SHARED_POSIX_THREAD_SAFE_FUNCTIONS
       _POSIX_THREAD_SPORADIC_SERVER_POSIX_THREAD_THREADS_MAX     _POSIX_TIME-
       OUTS_POSIX_TIMER_MAX              _POSIX_TRACE_POSIX_TRACE_EVENT_FILTER
       _POSIX_TRACE_EVENT_NAME_MAX_POSIX_TRACE_INHERIT
       _POSIX_TRACE_LOG_POSIX_TRACE_NAME_MAX
       _POSIX_TRACE_SYS_MAX_POSIX_TRACE_USER_EVENT_MAX
       _POSIX_TTY_NAME_MAX_POSIX_TYPED_MEMORY_OBJECTS
       _POSIX_TZNAME_MAX_POSIX_VERSION
       _POSIX_V6_ILP32_OFF32_POSIX_V6_ILP32_OFFBIG
       _POSIX_V6_LP64_OFF64_POSIX_V6_LPBIG_OFFBIG
       _V6_ILP32_OFF32_V6_ILP32_OFFBIG          _V6_LP64_OFF64_V6_LPBIG_OFFBIG
       RE_DUP_MAXSCHAR_MAX         SCHAR_MINSHRT_MAX         SHRT_MINSSIZE_MAX
       STREAM_MAXTMP_MAX   TZNAME_MAXUCHAR_MAX   UINT_MAXULONG_MAX  USHRT_MAX-
       WORD_BIT                        XBS5_ILP32_OFF32XBS5_ILP32_OFF32_CFLAGS
       XBS5_ILP32_OFF32_LDFLAGSXBS5_ILP32_OFF32_LIBS    XBS5_ILP32_OFF32_LINT-
       FLAGSXBS5_ILP32_OFFBIG          XBS5_ILP32_OFFBIG_CFLAGSXBS5_ILP32_OFF-
       BIG_LDFLAGS           XBS5_ILP32_OFFBIG_LIBSXBS5_ILP32_OFFBIG_LINTFLAGS
       XBS5_LP64_OFF64XBS5_LP64_OFF64_CFLAGS
       XBS5_LP64_OFF64_LDFLAGSXBS5_LP64_OFF64_LIBS       XBS5_LP64_OFF64_LINT-
       FLAGSXBS5_LPBIG_OFFBIG          XBS5_LPBIG_OFFBIG_CFLAGSXBS5_LPBIG_OFF-
       BIG_LDFLAGS           XBS5_LPBIG_OFFBIG_LIBSXBS5_LPBIG_OFFBIG_LINTFLAGS
       _XOPEN_CRYPT_XOPEN_ENH_I18N                 _XOPEN_IOV_MAX_XOPEN_LEGACY
       _XOPEN_NAME_MAX_XOPEN_PATH_MAX   _XOPEN_SHM_XOPEN_STREAMS   _XOPEN_VER-
       SION_XOPEN_XCU_VERSION _XOPEN_XPG2_XOPEN_XPG3 _XOPEN_XPG4


       The symbol PATH also is recognized, yielding the same value as the con-
       fstr() name value CS_PATH.

USAGE
       See  largefile(5)  for  the description of the behavior of getconf when
       encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).

EXAMPLES
       Example 1: Writing the value of a variable

       This example illustrates the value of {NGROUPS_MAX}:

       example% getconf NGROUPS_MAX

       Example 2: Writing the value of a variable for a specific directory

       This example illustrates the value of NAME_MAX for  a  specific  direc-
       tory:

       example% getconf NAME_MAX /usr

       Example 3: Dealing with unspecified results

       This  example  shows how to deal more carefully with results that might
       be unspecified:

       if value=$(getconf PATH_MAX /usr); then
                            if [ "$value" = "undefined" ]; then
                           echo PATH_MAX in /usr is infinite.
                            else
                           echo PATH_MAX in /usr is $value.
                           fi
                     else
                           echo Error in getconf.
                     fi


       Notice that

       sysconf(_SC_POSIX_C_BIND);


       and

       system("getconf POSIX2_C_BIND");


       in a C program could give different answers. The sysconf call  supplies
       a  value that corresponds to the conditions when the program was either
       compiled or executed, depending on the implementation. The system  call
       to getconf always supplies a value corresponding to conditions when the
       program is executed.

ENVIRONMENT VARIABLES
       See environ(5) for descriptions of the following environment  variables
       that  affect  the execution of getconf: LANG, LC_ALL, LC_CTYPE, LC_MES-
       SAGES, and NLSPATH.

EXIT STATUS
       The following exit values are returned:

       0        The specified variable is valid and information about its cur-
                rent state was written successfully.



       >>0       An error occurred.



ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:


       tab()     allbox;     cw(2.750000i)|    cw(2.750000i)    lw(2.750000i)|
       lw(2.750000i).   ATTRIBUTE  TYPEATTRIBUTE   VALUE   AvailabilitySUNWcsu
       Interface StabilityStandard


SEE ALSO
       pathconf(2),   confstr(3C),   sysconf(3C),  attributes(5),  environ(5),
       largefile(5), standards(5)



SunOS 5.10                        9 Apr 2004                        getconf(1)