»

ID #1075

Command line switches for the license server.

Command line option summary.

Usage: lscli [options]
Options are:
  -A              Set auto mode on.
  -a <nodeid>     Set node id (hostid/machinesig) of first node.
  -b <nodeid>     Set node id (hostid/machinesig) of second node.
  -C              Set concise mode.
  -c              Print out current batch count.
  -f <info>       Specifies the free form data to be included in logs.
  -g              Print out batches generated.
  -H              Show full help.
  -h              Show summary help.
  -L              Set issue licenses on.
  -l              Print out licenses remaining count.
  -M              Set auto mode off (manual mode).
  -N              Add nodeid's to the output package name.
  -P <pkg type>   Set the output package format.
  -p              Issue permanent licenses.
  -T <tier>       Set the tier to either 1, 2 or 3.
  -U <UBER Key>   Add a new UBER key.
  -v              Print out version info.
  -Y              Show available package output types.

 

1. Detailed usage

1.1 Definition - ${BASEDIR}

The base directory where the license server CLI is installed, default location is /opt/HAC/LicServ.

1.2 Overview

The license server CLI is a tool for issuing licenses, which is contained in the java jar file ${BASEDIR}/bin/lscli.jar. Licenses are unlocked using "uber-keys" and issued either "manually" or "automatically".

1.3 Definition: UBER key

This is a string provided by HAC which will just be written in upper case letters and numbers excluding B, 8, 0 and O. The key is used to unlock the ability to issue temporary licenses and to unlock a specific number of permanent licenses.

1.4 Definition: manual mode

When the CLI is used in manual mode the licenses will be created as .pkg package files, which are then to be moved to the nodes and manually added.  These files will be created in  ${BASEDIR}/dist and have helpful names so you know which node to move each to.  Once moved, to add the package (and license the node) run "pkgadd -n -d path/to/.pkg/file rsf-1-license" for each node.
NOTE: if you have already added a rsf-1-license package to a node you should remove it before adding new ones.  For example you may wish to turn a temp into a perm license, or you may have added a package in error.  To remove an rsf-1-license package run "pkgrm -n rsf-1-license".

1.5 Definition: automatic mode

When the CLI is used in automatic mode, the license server uses user input IP addresses to license nodes automatically over the network.  This mode does require an ssh binding (with empty passphrase) between the license server host and the nodes.

2. Usage

2.1 Flags

The license server must be called with specific combinations of flags which can be  determined by reading the flag information for each flag below.  At least one of the L, U, v, l, c, g or H flags must be used.

2.1.1 -L

Requests the license server to issue a license. This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the a, b, M-or-A and T flags.

2.1.2 -a <nodeid>

Specifies the ID/IP of the first node for licensing (node A).  This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the L, b, M-or-A and T flags.

2.1.3 -b <nodeid>

Specifies the ID/IP of the second node for licensing (node B).  This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the L, a, M-or-A and T flags.

2.1.4 -T <tier>

Specifies the licensing tier.  This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the a, b, M-or-A and L flags.

2.1.5 -M

Run the licensing server in manual mode. This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the L, a, b and T flags.

2.1.6 -A

Run the licensing server in automatic mode. This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the L, a, b and T flags.

2.1.7 -p

Issue permanent licenses.  This flag cannot be used in conjunction with the U flag, and must be used in conjunction with the a, b, T and L flags.  If this flag is not provided and the a, b, T and L flags have, then temporary licenses will be issued.

2.1.8 -U <UBER key>

Provide an UBER key to increase the number of licenses the server can generate.

2.1.9 -H

Print out detailed help documentation.

2.1.10 -V

Turn on verbose mode.

2.1.11 -v

Show version number.

2.1.12 -l

Show the number of remaining permanent licenses that can be generated.

2.1.13 -c

Show the current batch number.

2.1.14 -g 

Show the number of batches generated.

2.2 Examples

  • java -jar "${BASEDIR}/bin/lscli.jar" -H 

Displays detailed help.

  • java -jar "${BASEDIR}/bin/lscli.jar" -v -l -c -g

Displays the version number, the number of remaining permanent licenses, the current batch number and the number of batches generated.

  • java -jar "${BASEDIR}/bin/lscli.jar" -L -a12341234 -b12341234 -T 2 -M -V

Generate a tier 2 temporary license package for manual installation, with verbose mode on.

  • java -jar "${BASEDIR}/bin/lscli.jar" -p -L -a12341234 -b12341234 -T 1 -M

Generate a tier 1 permanent license package for manual installation.

  • java -jar "${BASEDIR}/bin/lscli.jar" -U <VALID-UBER-KEY>

Apply an UBER key to the license server.

2.3 Cancelling commands

To cancel the license server and cause it to terminate press the enter key.  If the command has been successfully cancelled the exit code will reflect this.  Sometimes the license server may be too far into it's current process to cancel the command.  It strongly discouraged to use CTRL + C to cancel the license server as this may leave files in an inconsistent, and non-recoverable state.  The license server should never hang, and if it does this may be due to a slow system or network. Moreover the license server has timeouts to prevent the license server from hanging indefinitely, and thus if the enter key does not cancel the process please be patient and wait for it to exit normally.

3 RETURN CODES

Please note that if the license server does not return 0, i.e. success, then information as to why will be output to the standard output stream as well as instructions for recommended actions.

0 - SUCCESS_RC

The command was successful.

1 - FATAL_ERROR_RC

The license server has been erroneously used and has had to terminate all processes.  It is likely that files have been edited in some way that should not be. You should in general not see this return code; if you do please contact HAC support.

2 - INCON_RC

The license server has detected an internal inconsistency. Please contact HAC support for rectification.

3 - CANCELLED_RC

The command was successfully cancelled before completion.
4 - INVALID_KEY_RC
The uber-key entered is invalid.

5 - ABORTED_RC

The license server has been erroneously used and had to terminate the session - for example an invalid host ID may have been entered.

6 - IO_EXCEPTION_RC

An IO exception has occurred.

7 - WAS_NOT_READY_RC

The server is unable to generate licenses some state is not ready. Most commonly either the license server cannot contact the hosts for licensing (when in auto mode), or there is not enough free licenses available.

8 - INVALID_ARGS_RC

Incorrect arguments entered.

Tags: -

Related entries:

Last update: 2014-07-03 11:31
Author: Paul Griffiths
Revision: 1.9

{writeDiggMsgTag} {writeFacebookMsgTag} {writePrintMsgTag} {writeSend2FriendMsgTag} {writePDFTag}
{translationForm}
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry