Licensing commands 编辑

While the Citrix Licensing Manager provides an easy method of accessing many licensing features, you can also perform licensing tasks using commands. You might use the license administration commands for advanced operations on the License Server that are not available in the console. Such operations include diagnosing check-out problems using lmdiag.

License administration commands are stored in:

  • C:\Program Files\Citrix\Licensing\LS on a 32-bit computer
  • C:\Program Files (x86)\Citrix\Licensing\LS on a 64-bit computer

Description of the licensing commands

Note:

In License Server version 11.16.6 build 34000, existing user management lmadmin.exe is replaced with Citrix owned user management lmgrd.exe. Ensure you do not use lmadmin.

Licensing commandsDescription
lmgrdStarts and manages the licensing server and other associated processes. lmgrd is the core licensing server file used for the Citrix licensing Windows service. It hosts the license server port (default 27000). Use the Citrix Licensing Manager for licensing configuration and administration tasks.
lmdiagDiagnoses license check-out problems.
lmdownGracefully shuts down the License Manager and Citrix vendor daemons (disabled by default).
lmhostidReports the host ID of the server on which Citrix Licensing is running.
lmrereadCauses the License Manager daemon to reread the license file and start the Citrix vendor daemon.
lmstatDisplays the status of a License Server.
lmutilDisplays a list of licensing utilities or runs other commands.
lmverDisplays version information for the licensing binaries.
udadminDisplays all licensed users and devices and deletes specified licensed users and devices. This command applies to user/device licenses only. To get a list of licenses, specify udadmin -list.
CtxManageUserAndGroupConfigures user and group access to manage the License Server.
CtxManageUserAndGroup.exe –useradd “domain\username” -Role “admin/user”Command to add a user.
CtxManageUserAndGroup.exe –useradd “domain\username” –Role “adminGroup/userGroup”Command to add a group.

Format license commands

Formatting conventions for the license administration commands:

ConventionDescription
BoldA command or switch, such as lmstat.
ItalicReplace variables with a value. For example, in the expression: lmstat -c license_file_list. Before you run the command, replace license_file_list with the names of one or more license files.
[Brackets]Brackets around text indicate the options that you can add to the command. It might indicate that text within the brackets must be replaced. For example: lmstat [-a] [-c license_file_list] [-f [feature]] can be written as: C:\Program Files (x86)\Citrix\Licensing\LS>lmstat.exe -a -c @localhost -f XDT_ENT_UD

Universal arguments

Valid arguments for most license administration commands:

ArgumentDescription
-allDisplays all information about the License Server.
-cLets you specify license files or License Server port and host name. If you specify the path without a license file name, the command applies to all the license files in the directory. For a local host: -c @localhost. For a remote License Server: -c @servername. For a License Server in a cluster: -c @clientaccesspointname. For a specified path: -c path. For the names of one or more license files: -c license_file_list. You can enter more than one license file path by separating each path with a semicolon. Path names that include spaces must be enclosed in double quotes.
-hLicense handle, as reported by lmstat -a. The license handle is a number used to identify a specific checked out license.
-helpDisplays usage information and exits.
-s [server]If you don’t specify a server, this argument displays the status of all the license files listed on the License Server or the license files on all the License Servers.
-verboseDisplays a longer description for all errors found.

Diagnose checkout problems (lmdiag)

The lmdiag command allows you to diagnose problems when a product cannot check out a license. In particular, you can test if your licenses are valid and if the License Server is running. When you run this command, it attempts to check out a license.

You can also use the lmdiag command to see if a specific type of license is working.

Example:

Run lmdiag on your Citrix Virtual Apps server Advanced edition licenses only. Specify MPS_ADV_CCU as an argument.

Syntax:

lmdiag -c license_file_list [-n] [feature[:keyword=value]]

ArgumentDescription
-c license_file_listDiagnoses the specified files. You can also use:-c @localhost or -c @server-name
-nRuns in non-interactive mode. lmdiag does not prompt for any input in this mode.
featureLimits the feedback to the specified feature.
keyword=valueIf a license file contains multiple lines for a particular feature, the result is limited to the line containing the text value. For example: lmdiag -c @localhost MPS_ENT_CCU:HOSTID=LICSERV01 attempts a checkout on the line with the host ID LICSERV01. Keyword is one of the following: VERSION, HOSTID, EXPDATE, KEY, VENDOR_STRING, ISSUER

If no feature is specified, lmdiag operates on all features in the license files in your list. The lmdiag command displays information about the license, then attempts to check out each license. When the checkout succeeds, lmdiag indicates that the checkout was successful. When the checkout fails, lmdiag gives you the reason for the failure. The lmdiag command tries to connect to each TCP/IP port on the License Server. It detects if the port number in the license file is incorrect. lmdiag lists each TCP/IP port number that is listening, and if -c license_file_list is specified, diagnoses the specified files.

The lmdiag command does not contact the computer running the Citrix product when it attempts to check out licenses. The lmdiag command indicates only if there are problems on the License Server. That is, your product cannot check out licenses because it is pointing to the wrong License Server, but lmdiag does not detect this problem. For example, a License Server that does not have licenses for that product on it. The lmdiag command reports that it can check out licenses when the Citrix product is pointing to the wrong License Server.

Stop daemons (lmdown)

The lmdown command shuts down the License Manager daemon and the Citrix vendor daemon on your License Server or all License Servers on your network. The lmdown command is disabled by default.

Syntax:

lmdown -c license_file_list [-vendor CITRIX] [-q] [-all]

ArgumentDescription
-c license_file_list or -c @localhost or -c @serverUse the specified license files. We always recommend specifying -c license_file_list with lmdown. You can also use:-c @localhostor -c @server-name
-vendor CITRIXShut down only the Citrix vendor daemon. The License Manager daemon continues to run.
-qDo not prompt or print a header. Otherwise, lmdown asks “Are you sure? [y/n]: .”
-allIf multiple servers are specified, automatically shuts down all of them. -q is implied with -all.

Run the lmdown command on a License Server. You can use -all to shut down all the License Servers on your network.

If lmdown encounters more than one server and you didn’t specify the -all argument, the command displays a choice of License Servers to shut down. For example, the -c argument specifies a directory with many *.lic files. Shut down the remote License Servers by using -c and specifying the name of the License Server.

Note:

If you use the Task Manager to terminate the License Manager daemon (Citrix Licensing Service), stop the lmgrd process first, then stop the Citrix vendor daemon process.

To stop and restart the Citrix vendor daemon only, use lmdown -c @localhost -vendor CITRIX, then use lmreread -c @localhost -vendor CITRIX to restart the vendor daemon.

Checks the license server binding information (lmhostid)

The lmhostid command returns the host ID of the License Server. You can use the command to check the host name of your License Server. You can open a license file and compare the host name in the license file to that of your License Server.

Note

Citrix Licensing, versions 11.5 and later for Windows allows you to display multiple host IDs if there are more than one host.

Syntax:

lmhostid -bindingidentifier

Where bindingidentifier is the argument.

ArgumentDescription
-etherUsed for product licenses that are tied to the MAC address of the appliance.
-internetUsed for Windows-based Citrix product software licenses that require a TCP/IP address.
-hostnameUsed for Windows-based Citrix product software licenses that are tied to the host name of the License Server. Note: The parameter hostname is case-sensitive and must match your License Server name exactly.

Reread license and options files (lmreread)

The lmreread command causes the Citrix vendor daemon to reread changes to the license file and the options file. After rereading, the Citrix vendor daemon uses the new settings and licenses from then on.

You cannot use lmreread remotely; run it locally on the License Server.

Syntax:

lmreread -c license_file_list [-all] [-vendor CITRIX]

ArgumentDescription
-c @localhost or -c license_file_listUse the specified license files.
-allIf more than one lmgrd is specified, this argument instructs all License Manager daemons to reread.
-vendor CITRIXSpecifies for the Citrix vendor daemon to be restarted.

Examples:

  • lmreread -c @localhost \[-all\]
  • lmreread -c @client\_access\_point\_name
  • lmreread -c /opt/citrix/licensing/myfiles/CITRIX.lic -vendor CITRIX

Display the list of licensing utilities (lmutil)

The lmutil command displays a list of licensing utilities when used standalone. When you specify lmutilwith another command, it runs that command.

Syntax:

lmutil

lmutil other_command

Examples:

  • lmutil

    Displays all the licensing utilities.

  • lmutil lmstat -c @localhost

    Runs the lmstat command.

Determine licensing status (lmstat)

The lmstat command helps you monitor the status of all licensing activities and provides you with information about license check outs, including:

  • The product that checked out one or more licenses
  • The checkout data
  • The version of the license file
  • The License Server name and port
  • The date the license was checked out
  • Information about the Citrix vendor daemon status and the license files

The lmstat command displays information that it receives from the License Server. The lmstat command displays only one use of the license, even if there are multiple connections sharing that license.

Syntax:

lmstat [-a] [-c license_file_list] [-f [feature]] [-i [feature] [-s[server] [-S [CITRIX]] [-t timeout_value]

ArgumentDescription
-aDisplays all information.
-c @localhost or -c @server or -c license_file_listUses the specified license files.
-f [feature]Displays the products using a feature (product license). If you don’t specify a feature, usage information for all features is displayed.
-i [feature]If you don’t specify a feature, this argument displays information from the INCREMENT line for the specified feature (product license) or all features.
-s [server]If you don’t specify a server, this argument displays the status of all license files listed on the License Server or the license files listed on all the License Servers.
-S [CITRIX]Lists all product servers using the features (product licenses) served by the Citrix vendor daemon.
-t timeout_valueSets connection timeout to timeout_value. This value limits the amount of time lmstat spends attempting to connect to the License Server.

The output from lmstat -c @localhost -a looks similar to this example. The lines in the example might break because of the screen space.

License Server status: 27000@localhost

   License file(s) on localhost: C:\Program Files (x86)\Citrix\Licensing\MyFiles\citrix_startup.lic:C:\Program Files (x86)\Citrix\Licensing\MyFiles\License.lic:

   localhost: license server UP v11.15.0

   Vendor daemon status (on LicenseServer):

      CITRIX: UP v11.15.0

Feature usage info:

   Users of CITRIX: (Total of 10000 licenses issued; Total of 1 licenses in use)

   "CITRIX" v2038.0101, vendor: CITRIX, expiry: permanent(no expiration date)
vendor_string: ;LT=SYS;GP=720;SA=0
floating license

   XDT DDCPrinc-0001.citrix.com XDT XDT\_PLT\&MPS_PLT_2018.0518 (v1.0) (localhost/27000 102), start Tue 5/8 17:59

Users of CTXLSDIAG: (Total of 10000 licenses issued; Total of 0 licenses in use)

Users of XDT_PLT_CCS: (Total of 200000 licenses issued; Total of 3 licenses in use)

   "XDT_PLT_CCS" v2018.1201, vendor: CITRIX, expiry: 01-dec-2018
vendor_string: ;LT=Retail;GP=720;PSL=10;CL=VDS,VDA,VDE,VDP;SA=0;ODP=0;NUDURMIN=2880;NUDURMAX=525600
floating license

   XDT DDCAux-0001.citrix.com XDT 00001E3A (v2018.0518) (localhost/27000 534201), start Wed 5/9 15:17
   XDT DDCAux-0001.citrix.com XDT 00001E81 (v2018.0518) (localhost/27000 392504), start Wed 5/9 15:18
   XDT DDCAux-0001.citrix.com XDT 00001E0C (v2018.0518) (localhost/27000 419703), start Wed 5/9 15:18
<!--NeedCopy-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:57 次

字数:22685

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文