MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


User Commands                                          getconf(1)



NAME
     getconf - get configuration values

SYNOPSIS
  /usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf
     /usr/bin/getconf [-v specification] systemvar


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


     /usr/bin/getconf -a


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


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


     /usr/xpg4/bin/getconf -a


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


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


     /usr/xpg6/bin/getconf -a


  ksh93
     getconf [-abdlpqrtw] [-c RE] [-n RE] [-s RE] [-v name][name [path [value] ...]


DESCRIPTION
  /usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf
     In the first synopsis form, the getconf  utility  writes  to
     the  standard  output the value of the variable specified by
     systemvar, in  accordance  with  specification  if  the  -v
     option is used.


     In the second synopsis form, getconf writes to the  standard
     output  the  value of the variable specified by pathvar for
     the path specified by pathname, in accordance with  specifi-
     cation if the -v option is used.


     In the third synopsis form, config writes  to  the  standard
     output   the  names  of  the  current  system  configuration



SunOS 5.11           Last change: 2 Nov 2007                    1






User Commands                                          getconf(1)



     variables.


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

  ksh93
     The getconf built-in in ksh93 is associated  with  the  /bin
     and  /usr/bin  paths. It is invoked when getconf is executed
     without a pathname prefix and the pathname  search  finds  a
     /bin/getconf or /usr/bin/getconf executable.


     getconf displays the system configuration value for name. If
     name  is a filesystem specific variable, the value is deter-
     mined relative to path, or, the current directory,  if  path
     is  omitted.  If  value  is  specified,  getconf attempts to
     change the process local value to value. - can  be  used  in
     place  of  path when it is not relevant. Only writable vari-
     ables can be set. readonly variables cannot be changed.


     The current value for name is written to the  standard  out-
     put. If name is valid but undefined, undefined is written to
     the standard output. If name is invalid or an  error  occurs
     in  determining  its value, a diagnostic is written to stan-
     dard error and getconf exits with a non-zero exit status.


     More than one variable can be set or  queried  by  providing
     the  name path value 3-tuple for each variable, specifying -
     for value when querying.


     If no operands are specified, all known variables are  writ-
     ten in name=value form to the standard output, one per line.
     Only one of --call, --name or --standard can be specified.

OPTIONS
  /usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf
     The following options  are  supported  by  /usr/bin/getconf,
     /usr/xpg4/bin/getconf, and /usr/xpg6/bin/getconf

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


     -vspecification    Gives the specification which governs the
                        selection  of  values  for  configuration



SunOS 5.11           Last change: 2 Nov 2007                    2






User Commands                                          getconf(1)



                        variables.


  ksh93
     The following options are supported by the getconf  built-in
     command in ksh93:

     -a                      Call the native getconf -a.
     --all

     -b                      List base variable name without call
     --base                  and standard prefixes.


     -c                      Display variables with  call  prefix
     --call=RE               that  matches  RE. The call prefixes
                             are:

                                 o    CS

                                      confstr(3C),

                                 o    PC

                                      pathconf(2)

                                 o    SC

                                      sysconf(3C)

                                 o    SI

                                      sysinfo(2)

                                 o    X

                                      Constant value


     -d                      Only display defined values when  no
     --defined               operands are specified.


     -l                      List variable names in lower case.
     --lowercase

     -n                      Display variables  with  names  that
     --name=RE               match RE.


     -p
     --portable



SunOS 5.11           Last change: 2 Nov 2007                    3






User Commands                                          getconf(1)



                             Display the named writable variables
                             and  values  in  a  form that can be
                             directly executed by ksh93(1) to set
                             the  values.  If  name  is  omitted,
                             lists all writable variables.


     -q                      Quote values ("...").
     --quote

     -r                      Display the named readonly variables
     --readonly              in name=value form. If name is omit-
                             ted, lists all readonly variables.


     -s                      Display variables with standard pre-
     --standard=RE           fix that matches RE. Use the --table
                             option to  view  all  standard  pre-
                             fixes, including local additions.

                             The standard prefixes  available  on
                             all systems are:


                               AES
                               AST
                               C
                               GNU
                               POSIX
                               SVID
                               XBS5
                               XOPEN
                               XPG




     -t                      Display the internal table that con-
     --table                 tains  the  name, standard, standard
                             section, and system call symbol pre-
                             fix for each variable.


     -w                      Display the named writable variables
     --writable              in name=value form. If name is omit-
                             ted, lists all writable variables.


     -v                      Call the native getconf -v name.
     --specification=name





SunOS 5.11           Last change: 2 Nov 2007                    4






User Commands                                          getconf(1)



OPERANDS
  /usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf
     The following operands are  supported  by  /usr/bin/getconf,
     /usr/xpg4/bin/getconf, and /usr/xpg6/bin/getconf:

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




     LINKMAX             NAMEMAX              POSIXCHOWNRESTRICTED
     MAXCANON            PATHMAX              POSIXNOTRUNC
     MAXINPUT            PIPEBUF              POSIXVDISABLE


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


     systemvar    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:




     ARGMAX                               BCBASEMAX
     BCDIMAX                            BCSCALEMAX
     BCSTRINGMAX                         CHARBIT
     CHARCLASNAMEMAX                    CHARMAX
     CHARMIN                              CHILDMAX
     CLKTCK                               COLWEIGHTSMAX
     CSPATH                               EXPRNESTMAX
     HOSTNAMEMAX                         INTMAX
     INTMIN                               LFS64CFLAGS
     LFS64LDFLAGS                         LFS64LIBS
     LFS64LINTFLAGS                       LFSCFLAGS
     LFSLDFLAGS                           LFSLIBS
     LFSLINTFLAGS                         LINEMAX
     LONGBIT                              LONGMAX
     LONGMIN                              MBLENMAX
     NGROUPSMAX                           NLARGMAX
     NLANGMAX                            NLMSGMAX
     NLNMAX                               NLSETMAX
     NLTEXTMAX                            NZERO
     OPENMAX                              POSIX2BCBASEMAX
     POSIX2BCDIMAX                     POSIX2BCSCALEMAX
     POSIX2BCSTRINGMAX                  POSIX2CBIND



SunOS 5.11           Last change: 2 Nov 2007                    5






User Commands                                          getconf(1)



     POSIX2CDEV                          POSIX2CHARTERM
     POSIX2COLWEIGHTSMAX               POSIX2CVERSION
     POSIX2EXPRNESTMAX                  POSIX2FORTDEV
     POSIX2FORTRUN                       POSIX2LINEMAX
     POSIX2LOCALEDEF                      POSIX2REDUPMAX
     POSIX2SWDEV                         POSIX2SYMLINKS
     POSIX2UPE                            POSIX2VERSION
     POSIXALOCSIZEMIN                  POSIXRECINCRXFERSIZE
     POSIXRECMAXFERSIZE               POSIXRECMINXFERSIZE
     POSIXRECXFERALIGN                  POSIXV6ILP32OF32
     POSIXV6ILP32OF32CFLAGS           POSIXV6ILP32OF32LDFLAGS
     POSIXV6ILP32OF32LIBS             POSIXV6ILP32OFBIG
     POSIXV6ILP32OFBIGCFLAGS          POSIXV6ILP32OFBIGLDFLAGS
     POSIXV6ILP32OFBIGLIBS            POSIXV6LP64OF64
     POSIXV6LP64OF64CFLAGS            POSIXV6LP64OF64LDFLAGS
     POSIXV6LP64OF64LIBS              POSIXV6LPBIGOFBIG
     POSIXV6LPBIGOFBIGCFLAGS          POSIXV6LPBIGOFBIGLDFLAGS
     POSIXV6LPBIGOFBIGLIBS            POSIXV6WIDTHRESTRICTEDENVS
     SYMLINKMAX                           SYMLOPMAX
     POSIX2BCBASEMAX                   POSIX2BCDIMAX
     POSIX2BCSCALEMAX                  POSIX2BCSTRINGMAX
     POSIX2CHARCLASNAMEMAX            POSIX2CHARTERM
     POSIX2COLWEIGHTSMAX              POSIX2CBIND
     POSIX2CDEV                         POSIX2CVERSION
     POSIX2EXPRNESTMAX                 POSIX2FORTDEV
     POSIX2FORTRUN                      POSIX2LINEMAX
     POSIX2LOCALEDEF                     POSIX2PBS
     POSIX2PBSACOUNTING                POSIX2PBSCHECKPOINT
     POSIX2PBSLOCATE                    POSIX2PBSMESAGE
     POSIX2PBSTRACK                     POSIX2REDUPMAX
     POSIX2SWDEV                        POSIX2UPE
     POSIX2VERSION                       POSIXADVISORYINFO
     POSIXAIOLISTIOMAX                 POSIXAIOMAX
     POSIXARGMAX                        POSIXASYNCIO
     POSIXBARIERS                       POSIXCHILDMAX
     POSIXCLOCKRESMIN                   POSIXCLOCKSELECTION
     POSIXCPUTIME                        POSIXDELAYTIMERMAX
     POSIXHOSTNAMEMAX                  POSIXIPV6
     POSIXJOBCONTROL                    POSIXLINKMAX
     POSIXLOGINAMEMAX                 POSIXMAXCANON
     POSIXMAXINPUT                      POSIXMONOTONICLOCK
     POSIXMQOPENMAX                    POSIXMQPRIOMAX
     POSIXNAMEMAX                       POSIXNGROUPSMAX
     POSIXOPENMAX                       POSIXPATHMAX
     POSIXPIPEBUF                       POSIXPRIOIO
     POSIXRAWSOCKETS                    POSIXREADERWRITERLOCKS
     POSIXREGEXP                         POSIXREDUPMAX
     POSIXRTSIGMAX                      POSIXSAVEDIDS
     POSIXSEMNSEMSMAX                  POSIXSEMVALUEMAX
     POSIXSHEL                          POSIXSIGQUEUEMAX
     POSIXSPAWN                          POSIXSPINLOCKS
     POSIXSPORADICSERVER                POSIXSIZEMAX



SunOS 5.11           Last change: 2 Nov 2007                    6






User Commands                                          getconf(1)



     POSIXSREPLMAX                    POSIXSTREAMAX
     POSIXSYMLINKMAX                    POSIXSYMLOPMAX
     POSIXSYNCIO                        POSIXTHREADATRSTACKADR
     POSIXTHREADATRSTACKSIZE          POSIXTHREADCPUTIME
     POSIXTHREADESTRUCTORITERATIONS   POSIXTHREADKEYSMAX
     POSIXTHREADPRIORITYSCHEDULING     POSIXTHREADPRIOINHERIT
     POSIXTHREADPRIOPROTECT            POSIXTHREADPROCESHARED
     POSIXTHREADSAFEFUNCTIONS          POSIXTHREADSPORADICSERVER
     POSIXTHREADTHREADSMAX             POSIXTIMEOUTS
     POSIXTIMERMAX                      POSIXTRAPOSIXTIMERMAXCE
     POSIXTRACEVENTFILTER             POSIXTRACEVENTNAMEMAX
     POSIXTRACEINHERIT                  POSIXTRACELOG
     POSIXTRACENAMEMAX                 POSIXTRACESYSMAX
     POSIXTRACEUSEREVENTMAX           POSIXTYNAMEMAX
     POSIXTYPEDMEMORYOBJECTS           POSIXTZNAMEMAX
     POSIXVERSION                        POSIXV6ILP32OF32
     POSIXV6ILP32OFBIG                POSIXV6LP64OF64
     POSIXV6LPBIGOFBIG                V6ILP32OF32
     V6ILP32OFBIG                      V6LP64OF64
     V6LPBIGOFBIG                      REDUPMAX
     SCHARMAX                             SCHARMIN
     SHRTMAX                              SHRTMIN
     SIZEMAX                             STREAMAX
     TMPMAX                               TZNAMEMAX
     UCHARMAX                             UINTMAX
     ULONGMAX                             USHRTMAX
     WORDBIT                              XBS5ILP32OF32
     XBS5ILP32OF32CFLAGS               XBS5ILP32OF32LDFLAGS
     XBS5ILP32OF32LIBS                 XBS5ILP32OF32LINTFLAGS
     XBS5ILP32OFBIG                     XBS5ILP32OFBIGCFLAGS
     XBS5ILP32OFBIGLDFLAGS             XBS5ILP32OFBIGLIBS
     XBS5ILP32OFBIGLINTFLAGS           XBS5LP64OF64
     XBS5LP64OF64CFLAGS                XBS5LP64OF64LDFLAGS
     XBS5LP64OF64LIBS                  XBS5LP64OF64LINTFLAGS
     XBS5LPBIGOFBIG                     XBS5LPBIGOFBIGCFLAGS
     XBS5LPBIGOFBIGLDFLAGS             XBS5LPBIGOFBIGLIBS
     XBS5LPBIGOFBIGLINTFLAGS           XOPENCRYPT
     XOPENENHI18N                       XOPENIOVMAX
     XOPENLEGACY                         XOPENAMEMAX
     XOPENPATHMAX                       XOPENSHM
     XOPENSTREAMS                        XOPENVERSION
     XOPENXCUVERSION                    XOPENXPG2
     XOPENXPG3                           XOPENXPG4



     The symbol PATH also is recognized, yielding the same  value
     as the confstr() name value CSPATH.

USAGE
     See largefile(5) for the  description  of  the  behavior  of
     /usr/bin/getconf  when  encountering  files  greater than or



SunOS 5.11           Last change: 2 Nov 2007                    7






User Commands                                          getconf(1)



     equal to 2 Gbyte ( 2^31 bytes).

EXAMPLES
     Example 1 Writing the Value of a Variable


     This example illustrates the value of {NGROUPSMAX}:


       example% getconf NGROUPSMAX



     Example 2 Writing the Value of a  Variable  for  a  Specific
     Directory


     This  example  illustrates  the  value  of  NAMEMAX  for  a
     specific directory:


       example% getconf NAMEMAX /usr



     Example 3 Dealing with Unspecified Results


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


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



     For example:


       sysconf(SCPOSIXCBIND);







SunOS 5.11           Last change: 2 Nov 2007                    8






User Commands                                          getconf(1)



     and


       system("getconf POSIX2CBIND");



     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  pro-
     gram is executed.


ENVIRONMENT VARIABLES
     See environ(5) for descriptions of the following environment
     variables  that  affect  the  execution  of  getconf:  LANG,
     LCAL, LCTYPE, LCMESAGES, and NLSPATH.


     The following environment variable is supported by the ksh93
     built-in getconf command:

     ASTFEATURES    Local writable values  that  are  different
                      from   the   default   are  stored  in  the
                      ASTFEATURES  environment  variable.   The
                      ASTFEATURES  value  is  a space-separated
                      list of name  path  value  3-tuples,  where
                      name is the system configuration name, path
                      is the corresponding path, - if no path  is
                      applicable,  and value is the system confi-
                      guration value.


EXIT STATUS
     The following exit values are returned:

     0     The specified variable is valid and information  about
           its current state was written successfully.


     >0    An error occurred.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

  /usr/bin/getconf, /usr/xpg4/bin/getconf, /usr/xpg6/bin/getconf





SunOS 5.11           Last change: 2 Nov 2007                    9






User Commands                                          getconf(1)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWcsu                     
    
     Interface Stability          Committed                   
    
     Standard                     See standards(5).           
    


  ksh93
     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWcsu                     
    
     Interface Stability          See below.                  
    



     The ksh93 built-in binding to /bin and /usr/bin is Volatile.
     The built-in command-line interface is Committed.

SEE ALSO
     ksh93(1),  sh(1),  pathconf(2),   sysinfo(2),   confstr(3C),
     sysconf(3C),  attributes(5), environ(5), largefile(5), stan-
     dards(5)


























SunOS 5.11           Last change: 2 Nov 2007                   10



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™