Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > G

getconf(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

getconf — get system configuration values

SYNOPSIS

getconf [-v specification] system_var

getconf [-v specification] system_var pathname

DESCRIPTION

The getconf command provides an interface to the confstr(3C), pathconf(2), and sysconf(2) library routines and system calls.

The system_var argument specifies the configuration value desired in confstr(), pathconf(), or sysconf(). Use the first synopsis form, for inquiries involving confstr(), or sysconf() (in the first table below). Use the second synopsis form, for inquiries involving pathconf() (in the second table below). For inquiries involving pathconf() the pathname operand should be specified.

Options

getconf recognizes the following option:

-v specification

Return configuration variables corresponding to a particular compilation environment supported by HP-UX. If the -v option is not specified, specification defaults to XBS5_ILP32_OFF32. See table below for possible specifications and meanings.

Specificationintlongpointeroff_t
XBS5_ILP32_OFF3232323232
XBS5_ILP32_OFFBIG323232>=64
XBS5_LP64_OFF6432646464
XBS5_LPBIG_OFFBIG>=32>=64>=64>=64

EXTERNAL INFLUENCES

Environment Variables

LC_MESSAGES determines the language in which messages are displayed.

If LC_MESSAGES is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.

If any internationalization variable contains an invalid setting, getconf behaves as if all internationalization variables are set to "C". See environ(5).

International Code Set Support

Single-byte and multi-byte character code sets are supported.

RETURN VALUE

The error codes returned by getconf are:

0

Success. A value corresponding to the operand was returned.

1

One or more missing operands.

2

Operand was not recognized.

3

pathname either invalid or inaccessible.

EXAMPLES

Request the number of intervals per second:

getconf CLK_TCK

Request the maximum value of a file's link count:

getconf LINK_MAX /etc/passwd

Enquire if the implementation supports multiple locality domains:

  • getconf CCNUMA_SUPPORT

  • getconf gives the following output:

1

If the implementation supports multiple locality domains.

undefined

If the implementation doesn't support multiple locality domains.

Other supported inquiries include the following:

  • ARG_MAX_BC_BASE_MAXBC_DIM_MAX
    BS_SCALE_MAXBC_STRING_MAXCHARCLASS_NAME_MAX
    CHAR_BITCHAR_MAXCHAR_MIN
    CHILD_MAXCLK_TCKCOLL_WEIGHTS_MAX
    CPU_CHIP_TYPECS_MACHINE_IDENTCS_PARTITION_IDENT
    CS_PATHCS_MACHINE_SERIALEXPR_NEST_MAX
    HW_CPU_SUPP_BITSHW_32_64_CAPABLEINT_MAX
    INT_MINIPMI_INTERFACEKERNEL_BITS
    LINE_MAXLONG_BITLONG_MAX
    LONG_MINMACHINE_IDENTMACHINE_MODEL
    MACHINE_SERIALMB_LEN_MAXNGROUPS_MAX
    NL_ARGMAXNL_LANGMAXNL_MSGMAX
    NL_NMAXNL_SETMAXNL_TEXTMAX
    NZEROOPEN_MAXPARTITION_IDENT
    PATH_POSIX_ARG_MAX_POSIX_JOB_CONTROL
    _POSIX_NGROUPS_MAX_POSIX_OPEN_MAX_POSIX_SAVED_IDS
    _POSIX_SSIZE_MAX_POSIX_STREAM_MAX_POSIX_TZNAME_MAX
    _POSIX_VERSIONPOSIX_ARG_MAXPOSIX_CHILD_MAX
    POSIX_JOB_CONTROLPOSIX_LINK_MAXPOSIX_MAX_CANON
    POSIX_MAX_INPUTPOSIX_NAME_MAXPOSIX_NGROUPS_MA
    POSIX_OPEN_MAXPOSIX_PATH_MAXPOSIX_PIPE_BUF
    POSIX_SAVED_IDSPOSIX_SSIZE_MAXPOSIX_STREAM_MAX
    POSIX_TZNAME_MAXPOSIX_VERSIONPOSIX2_BC_BASE_MAX
    POSIX2_BC_DIM_MAXPOSIX2_BC_SCALE_MAXPOSIX2_BC_STRING_MAX
    POSIX2_C_BINDPOSIX2_C_DEVPOSIX2_C_VERSION
    POSIX2_CHAR_TERMPOSIX_CHILD_MAXPOSIX2_COLL_WEIGHTS_MAX
    POSIX2_EXPR_NEST_MAXPOSIX2_FORT_DEVPOSIX2_FORT_RUN
    POSIX2_LINE_MAXPOSIX2_LOCALEDEFPOSIX2_RE_DUP_MAX
    POSIX2_SW_DEPOSIX2_UPEPOSIX2_VERSION
    PSET_SUPPORTSC_PASS_MAXSC_XOPEN_VERSION
    SCHAR_MAXSCHAR_MINSHRT_MAX
    SHRT_MINSSIZE_MAXSTREAM_MAX
    RE_DUP_MAXTMP_MAXTZNAME_MAX
    UCHAR_MAXUINT_MAXULONG_MAX
    USHRT_MAXWORD_BITXOPEN_VERSION
    XOPEN_XCU_VERSIONXOPEN_XPG2XOPEN_XPG3
    XOPEN_XPG4  

    XBS5_ILP32_OFF32_CFLAGSXBS5_ILP32_OFF32_LDFLAGS
    XBS5_ILP32_OFF32_LIBSXBS5_ILP32_OFF32_LINTFLAGS
    XBS5_ILP32_OFFBIG_CFLAGSXBS5_ILP32_OFFBIG_LDFLAGS
    XBS5_ILP32_OFFBIG_LIBSXBS5_ILP32_OFFBIG_LINTFLAGS
    XBS5_LP64_OFF64_CFLAGSXBS5_LP64_OFF64_LDFLAGS
    XBS5_LP64_OFF64_LIBSXBS5_LP64_OFF64_LINTFLAGS

Supported inquiries requiring the second parameter include:

  • LINK_MAXMAX_CANONMAX_INPUT
    NAME_MAXPATH_MAXPIPE_BUF
    _POSIX_CHOWN_RESTRICTED_POSIX_LINK_MAX_POSIX_MAX_CANON
    _POSIX_MAX_INPUT_POSIX_NO_TRUNC_POSIX_NAME_MAX
    _POSIX_PATH_MAX_POSIX_PIPE_BUF_POSIX_VDISABLE
    POSIX_CHOWN_RESTRICTEDPOSIX_NO_TRUNCPOSIX_VDISABLE

Note

For a complete list of parameters supported by getconf, look into the manual pages of sysconf(), pathconf(), and confstr().

AUTHOR

getconf was developed by HP and POSIX.

STANDARDS CONFORMANCE

getconf: POSIX.2, XPG4

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.