IBM

ls_readconfenv

Reads the LSF configuration parameters from the *confPath/lsf.conf file.

ls_readconfenv reads the LSF configuration parameters from the *confPath/lsf.conf file. If confPath is NULL, the LSF configurable parameters are read from the ${LSF_ENVDIR:-/etc}/lsf.conf file. See lsf.conf. The input paramList is an array of data structures that are defined in <lsf/lsf.h>. The paramName parameter in the config_param data structure should be the pointer to the configuration parameter name defined in the *confPath/lsf.conf or /etc/lsf.conf file if confPath is NULL. The paramValue parameter in the config_param data structure must initially contain NULL and is then modified to point to a result string if a matching paramName is found in the lsf.conf file. A typical data structure declaration is as follows:

struct config_param paramList[] =
{
#define LSF_CONFDIR 0
      {"LSF_CONFDIR", NULL},
#define LSF_LOGDIR 1
      {"LSF_LOGDIR", NULL},
#define LSF_SERVERDIR 2
      {"LSF_SERVERDIR", NULL},
#define LSF_RES_DEBUG 3
      {"LSF_RES_DEBUG", NULL},
#define LSF_NPARAMS 4
      {NULL, NULL},
};

By calling ls_readconfenv (paramList, "/localpath/etc"), it is possible to read in the required parameters and use the defined constants as indices for referencing the parameters when needed. If a certain parameter name is not found in the lsf.conf file, then its paramValue will remain NULL on return.

#include <lsf/lsf.h>

int ls_readconfenv(struct config_param *paramList, char *confPath)

Parameters:
*paramlist An array of data structures that are defined in <lsf/lsf.h>.
*confPath The config file's path.
Data Structures:
config_param
Define Statements:
none
Returns:
int:0
Function was successful.

int:-1
Function failed.

Errors:
If the function fails, lserrno is set to indicate the error.
Equivalent line commands:
none
Files:
${LSF_ENVDIR:-/etc}/lsf.conf
See also:
none


     
Date Modified: 16 Jul 2014

Terms of Use
Copyright © 1994-2014 International Business Machines Corp.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.