FlexLM lmremove forced return license operation method

According to the Flexlm user manaul documentation, we can see that the lmremove command has two specific uses:

Emphasis: lmremove is both a separate command and a parameter of the lmtuil command. The effect of executing lmremove *** is the same as executing lmutil lmremove ***

            Even in some flexlm packages, lmremove is just an alias for lmutil.

lmremove [-c license_file_list] feature user user_host display

or

lmremove [-c license_file_list] -h feature server_host port handle

Of the two usages, the second is recommended because the parameters are clearer and easier to find.

Before using it, we need to clarify the meaning of each parameter.

-c license_file_list Specifies the license file.

feature feature name.

user username

user_host The name of the server where the user calls the feature

display terminal name (this is the most difficult to understand and the most difficult to find, because of this option problem, we do not recommend using the first method)

server_host License Server name

port License running port

handle the handle the program is running on

After clarifying the meaning of these parameters, we need to understand how to obtain the required parameters. At this time we need to use the lmstat command, the usual usage of the lmstat command:

lmstat -a -c port@hostname

Through the lmstat command, we can see the usage of the specific license

Such as:

Users of Verdi:  (Total of 5 licenses issued;  Total of 1 license in use)

  "Verdi" v2021.09, vendor: snpslmd, expiry: 19-apr-2028
  vendor_string: ^1+S
  floating license

    user01 host05 2104470273015444378_1 (v2018.12) (server1/27000 787), start Wed 10/8 11:12

Here I only intercepted part of the display results.

Explain the relevant parameter information (only look at the last line)

user01 username (corresponding to user in lmremove)

host05 calls the feature's server (corresponding to user_host in lmremove)

2104470273015444378_1 Terminal name (corresponding to display in lmremove, normally, it should display something like /dev/tty**)

server1 license server name (corresponding to server_host in lmremove)

27000 license port number (corresponding to the port in lmremove)

787 handle number (corresponding to handle in lmemove)

 

Given that terminal names are not easy to use, we recommend the second way of using lmremove.

Instructions:

lmremove -c /license/xxxxx.lic -h Verdi server1 27000 787

Note: /license/xxxxx.lic is the absolute path of the license file, and a relative path is also acceptable.

There is no particularly obvious prompt after the successful operation

lmutil - Copyright (c) 1989-2019 Flexera. All Rights Reserved.

If the operation fails, it will prompt that the corresponding parameters are incorrect. I deliberately enter the wrong handle number here.

lmutil - Copyright (c) 1989-2019 Flexera. All Rights Reserved.
lmremove: license handle 757 not found on this license server (server1)

Execute the lmstat command again and find that the license has been forcibly returned.

 

{{o.name}}
{{m.name}}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324139115&siteId=291194637