HPlogo HP-UX Reference Volume 1 of 5 > g

getconf(1)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

getconf — get system configuration values

SYNOPSIS

getconf [-v specification] [system_var]

getconf [-v specification] [path_var] [pathname]

DESCRIPTION

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

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).

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 or extra operands.

2

Operand was not recognized.

3

pathname could not be accessed.

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_POSIX_CHILD_MAXPOSIX2_C_DEV
BC_BASE_MAX_POSIX_JOB_CONTROLPOSIX2_EXPR_NEST_MAX
BC_DIM_MAX_POSIX_NGROUPS_MAXPOSIX2_FORT_DEV
BC_SCALE_MAX_POSIX_OPEN_MAXPOSIX2_FORT_RUN
BC_STRING_MAX_POSIX_SAVED_IDSPOSIX2_LINE_MAX
CHILD_MAX_POSIX_SSIZE_MAXPOSIX2_LOCALEDEF
CLK_TCK_POSIX_STREAM_MAXPOSIX2_RE_DUP_MAX
COLL_WEIGHTS_MAX_POSIX_TZNAME_MAXPOSIX2_SW_DEV
CS_PATH_POSIX_VERSIONPOSIX2_VERSION
EXPR_NEST_MAXPOSIX2_BC_BASE_MAXRE_DUP_MAX
LINE_MAXPOSIX2_BC_DIM_MAXSC_PASS_MAX
NGROUPS_MAXPOSIX2_BC_SCALE_MAXSC_XOPEN_VERSION
OPEN_MAXPOSIX2_BC_STRING_MAXSTREAM_MAX
PATHPOSIX2_COLL_WEIGHTS_MAXTZNAME_MAX
_POSIX_ARG_MAXPOSIX2_C_BIND 
CHARCLASS_NAME_MAXCHAR_BITCHAR_MAX
CHAR_MINNZEROPOSIX2_CHAR_TERM
POSIX2_C_VERSIONPOSIX_OPEN_MAXPOSIX_PATH_MAX
POSIX_PIPE_BUFPOSIX_SAVED_IDSPOSIX_SSIZE_MAX
POSIX_STREAM_MAXPOSIX_TZNAME_MAXPOSIX_VERSION
SCHAR_MAXSCHAR_MININT_MAX
INT_MINLONG_BITLONG_MAX
LONG_MINMB_LEN_MAXNL_NMAX
NL_ARGMAXNL_LANGMAXNL_MSGMAX
NL_SETMAXNL_TEXTMAXPOSIX2_UPE
POSIX_ARG_MAXPOSIX_CHILD_MAXPOSIX_JOB_CONTROL
POSIX_LINK_MAXPOSIX_MAX_CANONPOSIX_MAX_INPUT
POSIX_NAME_MAXPOSIX_NGROUPS_MAXSHRT_MAX
SHRT_MINSSIZE_MAXTMP_MAX
UCHAR_MAXUINT_MAXULONG_MAX
USHRT_MAXWORD_BITXOPEN_VERSION
XOPEN_XCU_VERSIONXOPEN_XPG2XOPEN_XPG3
XOPEN_XPG4CPU_CHIP_TYPEKERNEL_BITS
HW_CPU_SUPP_BITSMACHINE_MODELHW_32_64_CAPABLE

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_MAXPIPE_BUF_POSIX_NAME_MAX
MAX_CANON_POSIX_CHOWN_RESTRICTED_POSIX_NO_TRUNC
MAX_INPUT_POSIX_LINK_MAX_POSIX_PATH_MAX
NAME_MAX_POSIX_MAX_CANON_POSIX_PIPE_BUF
PATH_MAX_POSIX_MAX_INPUT_POSIX_VDISABLE
POSIX_NO_TRUNCPOSIX_CHOWN_RESTRICTEDPOSIX_VDISABLE

AUTHOR

getconf was developed by HP and POSIX.

STANDARDS CONFORMANCE

getconf: POSIX.2, XPG4

© Hewlett-Packard Development Company, L.P.