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 11i Version 1.5 Reference Volume 1, Section 1: Commands > g

getconf(1)

» 

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

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_MINKERNEL_BITSLINE_MAX
    LONG_BITLONG_MAXLONG_MIN
    MACHINE_IDENTMACHINE_MODELMACHINE_SERIAL
    MB_LEN_MAXNGROUPS_MAXNL_ARGMAX
    NL_LANGMAXNL_MSGMAXNL_NMAX
    NL_SETMAXNL_TEXTMAXNZERO
    OPEN_MAXPARTITION_IDENTPATH
    _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_VERSION
    POSIX_ARG_MAXPOSIX_CHILD_MAXPOSIX_JOB_CONTROL
    POSIX_LINK_MAXPOSIX_MAX_CANONPOSIX_MAX_INPUT
    POSIX_NAME_MAXPOSIX_NGROUPS_MAXPOSIX_OPEN_MAX
    POSIX_PATH_MAXPOSIX_PIPE_BUFPOSIX_SAVED_IDS
    POSIX_SSIZE_MAXPOSIX_STREAM_MAXPOSIX_TZNAME_MAX
    POSIX_VERSIONPOSIX2_BC_BASE_MAXPOSIX2_BC_DIM_MAX
    POSIX2_BC_SCALE_MAXPOSIX2_BC_STRING_MAXPOSIX2_C_BIND
    POSIX2_C_DEVPOSIX2_C_VERSIONPOSIX2_CHAR_TERM
    POSIX_CHILD_MAXPOSIX2_COLL_WEIGHTS_MAXPOSIX2_EXPR_NEST_MAX
    POSIX2_FORT_DEVPOSIX2_FORT_RUNPOSIX2_LINE_MAX
    POSIX2_LOCALEDEFPOSIX2_RE_DUP_MAXPOSIX2_SW_DEV
    POSIX2_UPEPOSIX2_VERSIONSC_PASS_MAX
    SC_XOPEN_VERSIONSCHAR_MAXSCHAR_MIN
    SHRT_MAXSHRT_MINSSIZE_MAX
    STREAM_MAXRE_DUP_MAXTMP_MAX
    TZNAME_MAXUCHAR_MAXUINT_MAX
    ULONG_MAXUSHRT_MAXWORD_BIT
    XOPEN_VERSIONXOPEN_XCU_VERSIONXOPEN_XPG2
    XOPEN_XPG3XOPEN_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

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-2001 Hewlett-Packard Development Company, L.P.