HSI Environment Variables

HSI and its support libraries use several environment variables to control the program behavior.  The method of setting these variables depends upon the shell that is in effect: 

For csh, environment variables are set by using the syntax:

            setenv environment_variable=value

For sh, ksh or bash, environment variables can be set by using the syntax:

            export environment_variable

       environment_variable=value

For  ksh or bash the two lines can be combined into one:

            export environment_variable=value


The following system or HPSS-defined environment variables are currently used by the HSI package:


ENVIRONMENT …… This variable is checked to determine whether HSI is being run in a batch environment.  If set to “BATCH”, HSI assumes that the job is not being run interactively.


HOME …… This is the home directory for the local logged-in user

 

KRB5CCNAME …….. If using kerberos authentication (see HPSS_AUTH_METHOD, below),

this specifies where the credentials cache file should be written or looked for.


The following environment variables are defined for the HSI package:


HPSS_EGD_PATH - this is the path to the Entropy Gathering Daemon, used for OpenSSL calls.


HPSS_HOSTNAME - this variable is used when determining which network interface to use for connections from the HPSS movers.  It can be either a host name or an IP address.  It can be overridden by the HPSS.conf “PFTP Client Interfaces stanza.  If not specified, then HSI uses the interface associated with the hostname command.  


HSI_NOLOGIN_FILE - this is checked by HSI during startup to determine whether the site admins have disabled access to HPSS.


HPSS_PFTPC_PORT_RANGE=ncacn_ip_tcp[start-end] …… This variable is used to define a range of restricted ports that HSI will use when opening sockets for inbound connections from movers, or for authorization protocols such as kerberos.  Note: in HSI version 5.0.0 and beyond, the new and preferred syntax for a restricted  port range is:

         HPSS_PORT_RANGE=start_port-end_port

  The older form is deprecated, but will continue to be supported for now.


HPSS_USE_NETRC_FILE .................   If this variable is defined, HSI will attempt to read a .netrc file to obtain the password to be used for either the local ("-A local" command line option) or combo ("-A combo" command line option) authentication method.


HPSS_API_DEBUG=debug_mask .........................   [HSI 3.4.3 and later] If this environment variable is set, debug_mask defines the logging bitmask for the HSI Gateway Library, which corresponds to the priority levels defined for syslog(1). This value is an integer value between 0 and 255, and may specified as a normal integer, or an octal value (with a leading 0), or a hexadecimal value (with a leading '0x').  The default value is 255 (0xFF).

Bit positions are as follows:

  2^0 : [LOG_EMERG] .... system is unusable

  2^1 : [LOG_ALERT] .... action must be taken immediately

  2^2 : [LOG_CRIT] ..... critical conditions

  2^3 : [LOG_ERR] ...... error conditions

  2^4 : [LOG_WARNING] .. warning conditions

  2^5 : [LOG_NOTICE] ... normal but significant condition

  2^6 : [LOG_INFO} ..... informational

  2^7 : [LOG_DEBUG] .... debug-level messages

respectively.   This environment variable must be set in order to enable any debug logging.  Normally, this variable will be set and the default (255) will be used for HPSS_API_DEBUG.
HPSS_API_DEBUG_PATH=path   if set, contains the pathname used for the debug file.  This file is appended to unless the "overwrite" option is set in HPSS_API_DEBUG_FLAGS. If the pathname is "stdout" or "stderr", the log is written to stdout or stderr,
HPSS_API_DEBUG_FLAGS: if set, contains a list of one-character flags used to
control the logging as follows:


  • w - if set, the log file is truncated to zero length or created for writing
  • a - (default) if set, the log file is created if it does not exist,
  •        or positioned to the end of the file, and all writes occur at the  end of the file.
  • f - if set, causes the log file to be flushed after each call.  Note that this happens automatically if writing to stderr or stdout.
  • m - trace inbound/outbound messages
  • p - if set, causes pid to be included in message prefix.
  • r - if set, cause realtime (hi-res) time to be included in message prefix
  • R - if set, disable hi-res time in message prefix
  • t - (default)if set, causes time from ctime(time()) to be included in msg prefix.
  • T - if set, disables "t" flag


- Unrecognized flags are silently ignored.
- If there are duplicated or conflicting flags, the last one encountered is used.


HSI_HISTFILE: when HSI is built with command-line editing enabled, this variable is used to specify the local file where command history is saved and restored in future sessions.


HSI_HISTSIZE : when HSI is built with command-line editing enabled, this variable is used to override the default number of command lines that are saved and displayed with the history command.