How to define License Servers via Environment Variables instead of License File(s)
There are two environment variables available for the definition of FNP license servers instead of using license files:
- SOCBU_LICENSE_FILE
- LM_LICENSE_FILE
You can define the environment variable in user configuration files like .profile, .bash-profile which can be found in the home directory of the user. This means that the setup is user specific. If another user logs in and uses SmarTest, then this setup is not available.
If the definition should be independent from the user you need to use a system wide configuration file like /etc/profile.
There are some rules you need to know for the configuration of the variables:
- If you want to define several license servers, they are separated by colons ‘:’.
Example: you have two license servers, the first one - named licserv - is the license server which provides the normal licenses and the second license server provides bridging or emergency licenses - named licservbridge, then you need to separate them via colons:
SOCBU_LICENSE_FILE=@licserv:@licservbridge - If you do not use the standard ports 27000 - 27009, then you need to configure the used ports like
SOCBU_LICENSE_FILE=27010@licserv:27011@licservbridge - Three-redundancy-licenser server are separated by comma ",".
Example: you have a three-redundancy-license server with the server names licserv1, licserv2, licserv3 and an standby emergency license server named licservbridge, then the definition will look like
SOCBU_LICENSE_FILE=27000@licserv1,27000@licserv2,27000@licserv3:licservbridge
Note: a three-redundancy-license server must have fix ports for each server (this also needs to be defined in the license file on each SERVER line). Therefore you need to configure the port for the three-redundancy-license server also with using the environment variable.
- SOCBU_LICENSE_FILE has precedence before LM_LICENSE_FILE.
If both environment variables are defined, for example one on a system wide level and the other on the user level, then the definition of SOCBU_LICENSE_FILE will be used by SmarTest.
SOCBU_LICENSE_FILE and LM_LICENSE_FILE have precedence before license files existing in/opt/flexlm/license.
So if there are license files in/opt/flexlm/licenseand e.g. SOCBU_LICENSE_FILE is defined then the license server definition of SOCBU_LICENSE_FILE will be used for the license server connection.