Batch commands (flmprg)

Using the license manager batch feature allows you to run commands from a script file or in the batch console mode of the command.

Syntax

flmprg --batch [ help | action=command [ parameters ] [ ^indent= [ on | off ] ]  

Where:

  1. command can be an action to display information, manage licenses, and view active users, etc.
  2. parameters can be one or more parameters and values separated by the caret character (^). There is no space allowed before or after the caret.
    ^parameter=value[^...]
Note:

Caret character (^)

flmprg uses the caret character (^) for parsing.
flmprg --batch action=install-mkey^lnum=license_num^mkey=maintenance_key
In Windows® the caret is also used to escape special characters. To escape it, you may need to double (^^) it up.
flmprg --batch action=install-mkey^^lnum=license_num^^mkey=maintenance_key

Usage

There are different ways of using batch commands, depending on your requirements.
  • You can enter batch commands at the console of the flmprg running in batch console mode (flmprg --batch-console)
    action=product-info 
  • You can write batch commands to script files, one command per line.
    flmprg --batch action=product-info 
    The script file can be executed directly to run the commands.
  • You can write batch commands to a JSON file, one command per line.
    {"action":"product-info"}
    The JSON file can be piped into a command to run the flmprg in batch console mode.
    flmprg --batch-console < myjsoncmds 
Use batch commands to perform actions to manage the Four Js License Manager.
  1. License information commands are described in Table 1.
  2. License management commands are described in Table 2.
  3. Commands using string licenses are described in Table 3.
  4. Active user management commands are described in Table 4.

The output from commands is JSON formatted. You can enable / disable indentation on the output. If the output is to standard out, the output is indented by default. If you are piping the output to a file or redirection (no terminal), the output indentation is disabled by default. You can combine an indentation instruction with any batch action.

action=product-info^indent=on
Table 1. Information commands
Commands Description
action=target-info Display information about the operating system, such as w64v141, l64xl217, etc.
flmprg --batch action=target-info
action=product-info Display information about the product version.
action=license-info Display license information.
action=user-info Display active users information.
action=lm-info Display information on the license manager configuration.
action=up-info Check if a configured license manager is running and responding.
action=env-info Display environment / configuration information.
action=host-info Display host information.
flmprg --batch action=host-info
Optional parameters are:
  • host: Specify the host name.
    flmprg --batch action=host-info^host=myhost
  • all: Display information for all hosts. This is the default action.
    flmprg --batch action=host-info^host=all
Table 2. License management
Commands Description
action=install-license Install a license. Required parameters:
  • lnum: License number
  • lkey: License key.
  • mkey: (Optional) Maintenance key or subscription key
Examples:
flmprg --batch action=install-license^lnum=XXX#XXXXXXXX^lkey=YYYYYYYYYYYY
flmprg --batch action=install-license^lnum=XXX#XXXXXXXX^lkey=YYYYYYYYYYYY^mkey=ZZZZZZZZZZZZ
action=uninstall-license Uninstall the license. The parameter lnum is a required with the license number.
flmprg --batch action=uninstall-license^lnum=XXX#XXXXXXXX
action=install-mkey Install a maintenance key or a subscription key. Required parameters:
  • lnum: License number
  • mkey: Maintenance key or subscription key
flmprg --batch action=install-mkey^lnum=XXX#XXXXXXXX^mkey=YYYYYYYYYYYY
action=install-ikey Install an installation key (Activate the license). Required parameters:
  • lnum: License number
  • ikey: Installation key.
flmprg --batch action=install-ikey^lnum=XXX#XXXXXXXXX^ikey=XXXXXXXXXXXX
action=install-mkey-http Install a maintenance or subscription key using HTTP. Required parameters:
  • login: The customer code.
  • lnum: License number
Optional parameters:
  • proxy: Proxy host name
  • proxy-port: Proxy port, default is 3128
  • proxy-user: User name for proxy authentication.
  • proxy-password: Password for proxy authentication.
action=install-ikey-http Install an installation key using HTTP (Activate the license). Required parameters:
  • login: The customer code.
  • lnum: License number
Optional parameters:
  • proxy: Proxy host name
  • proxy-port: Proxy port, default is 3128
  • proxy-user: User name for proxy authentication.
  • proxy-password: Password for proxy authentication.
Table 3. License management (using license string)
Commands Description
action=decode-license-string Decode a license string. The parameter license-string is required with the license string to decode.
action=encode-license-string Encode a license string. Required parameters:
  • lnum: License number
  • lkey: License key.
  • mkey: Maintenance key or subscription key
  • login: The customer code.
action=install-license-string Install a license in temporary mode using a license string. The parameter license-string is required with the license string to install.
action=install-license-string-http Install a license using a license string over HTTP. The parameter license-string is required with the license string to install.
Table 4. User management
Commands Description
action=check-users Check active users.
flmprg --batch action=check-users 
Optional parameters:
  • host: Check active users on a specified host.
    flmprg --batch action=check-users^host=myhost
  • all: Check active users on all hosts. This is the default action.
    flmprg --batch action=host-info^host=all
action=clear-sessions Clear all sessions.
flmprg --batch action=clear-sessions
Optional parameters:
  • lnum: Clear sessions for the specified license number.
    flmprg --batch action=clear-sessions^lnum=XXX#XXXXXXXX
  • all: Clear sessions for all licenses. This is the default action of the command.
    flmprg --batch action=clear-sessions^lnum=all
action=kill-session Kill session. Required parameter:
  • host: Kill sessions on the specified host.
    flmprg --batch action=kill-session^host=myhost
Optional parameter:
  • process-id: The process id to remove.
    flmprg --batch action=kill-session^host=myhost^process-id=123456