Product Documentation

License administration commands

Mar 16, 2015

While the License Administration Console provides an easy method of accessing many licensing features, you can also perform licensing tasks using commands. You might use license administration commands when performing 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)\CCitrix\Licensing\LS on a 64-bit computer
  • /opt/citrix/licensing/LS for License Server VPX

Table of commands

Utility Description
lmadmin Provides licensing configuration. Use the License Administration Console for licensing configuration and administration tasks. Do not use lmadmin.
lmdiag Diagnoses license check-out problems.
lmdown Gracefully shuts down the License Manager and Citrix vendor daemons (disabled by default).
lmhostid Reports the host ID of the server on which Citrix Licensing is running.
lmreread Causes the License Manager daemon to reread the license file and start the Citrix vendor daemon.
lmstat Displays the status of a license server.
lmutil Displays a list of licensing utilities or executes other commands.
lmver Displays version information for the licensing binaries. See lmver.
udadmin Displays all licensed users and devices and deletes specified licensed users and devices. This command applies to User/Device licenses only.

Format license commands

Formatting conventions for the license administration commands:
Convention Description
Bold A command or switch, such as lmstat.
Italic You need to replace variables with a value; for example, in the expression:

lmstat -clicense_file_list

Before you run the command you must replace license_file_list with the names of one or more license files.

[square brackets] Square brackets around text indicate options that can be added to the command or that text within the brackets needs to be replaced.

Universal arguments

Valid arguments for most license administration commands:
Argument Description
-all Applies the command to all of the license servers on the network.
-c Lets you specify license file(s) 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.

-h License handle, as reported by lmstat -a. The license handle is a number used to identify a specific checked out license.
-help Displays usage information and exits.
-s [server] Displays the status of all license files listed on the license server or on all license servers, if server is not specified.
-verbose Displays a longer description for all errors found.

Diagnose checkout problems (lmdiag)

lmdiag 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 utility, it attempts to check out a license.

You can also use the lmdiag utility to see if a specific type of license is working. For instance, you can run lmdiag on your Citrix XenApp server, Advanced edition licenses only by specifying MPS_ADV_CCU as an argument.

Syntax

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

-c license_file_list

Diagnoses the specified files. You can also use:-c @localhost or -c @server-name
-n Runs in non-interactive mode; lmdiag does not prompt for any input in this mode.
feature Limits the feedback to the specified feature.
keyword=value If 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. lmdiag displays information about the license, then attempts to check out each license. If the check out succeeds, lmdiag indicates success. If the check out fails, lmdiag gives you the reason for the failure. lmdiag attempts 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.

lmdiag does not contact the computer running the Citrix product when it attempts to check out licenses. lmdiag 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 (for example, a license server that does not have licenses for that product on it), but lmdiag does not detect this problem. lmdiag reports that it can check out licenses when the Citrix product is pointing to the wrong license server.

Stop daemons (lmdown)

The lmdown utility shuts down the License Manager daemon and the Citrix vendor daemon on your license server or all license servers on your network but is disabled by default. To enable it:

  1. Stop the license service.
  2. Run lmadmin - allowStopServer and/or -allowRemoteStop Server.
  3. Restart the license server.

Syntax

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

-c @localhost  
or
-c@server
or
-c license_file_list

Use the specified license files. Note that specifying -c license_file_list is always recommended with lmdown. You can also use:-c @localhostor -c @server-name
-vendor CITRIX Shut down only the Citrix vendor daemon. The License Manager daemon continues to run.
-q Do not prompt or print a header. Otherwise lmdown asks “Are you sure? [y/n]: .”
-all If multiple servers are specified, automatically shuts down all of them. -q is implied with -all.

The lmdown utility must be run on a license server. You can use -all to shut down all of the license servers on your network.

If lmdown encounters more than one server (for example if -c specifies a directory with many *.lic files) and -all is not specified, the utility displays a choice of license servers to shut down. You can shut down 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.

Check host names (lmhostid)

The lmhostid utility 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
Argument (bindingidentifier) Description
-ether Used for product licenses that are tied to the MAC address of the appliance.
-internet Used for Windows-based Citrix product software licenses that require a TCP/IP address.
-hostname Used for Windows-based Citrix product software licenses that are tied to the hostnameof 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 utility 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/or licenses going forward.

lmreread cannot be used remotely; run it locally on the license server.

Syntax

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

-c @localhost or -c license_file_list

Use the specified license files.
-all If more than one lmgrd is specified, instructs all License Manager daemons to reread.
-vendor CITRIX Specifies 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 utility displays a list of licensing utilities when used standalone. When you specify lmutil with another command, it executes that command.

Syntax

lmutil
lmutil other_command

Examples

  • lmutil

    Displays all the licensing utilities.

  • lmutil lmstat -c @localhost

    Executes the lmstat command.

Determine licensing status (lmstat)

The lmstat utility helps you monitor the status of all network licensing activities and provides you with information about license check outs, including:
  • The product that checked out one or more licenses
  • The check out 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

lmstat displays information that it receives from the license server. lmstat 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]
Argument Description
-a Displays all information.
-c @localhost or -c@server or -c license_file_list Uses the specified license files.
-f [feature] Displays the products using a feature (product license). If feature is not specified, usage information for all features is displayed.
-i [feature] Displays information from the INCREMENT line for the specified feature (product license) or all features if feature is not specified.
-s [server] Displays status of all license files listed on the license server or on all license servers, if server is not specified.
-S [CITRIX] Lists all product servers using the features (product licenses) served by the Citrix vendor daemon.
-t timeout_value Sets connection time-out to timeout_value. This limits the amount of time lmstat spends attempting to connect to the license server.
The output of lmstat -c@localhost -a looks similar to:
License server status: 27000@license_server1 
License files on license_server1: C:\Program Files\Citrix\Licensing\MyFiles\citrix_startup.lic:  
C:\Program Files\Citrix\Licensing\MyFiles\citrixlic_20031001094430.lic:  
 
license_server1: license server UP (MASTER) v9.2  
 
Vendor daemon status (on license_server1):  
 
CITRIX: UP v9.2  
 
Feature usage info:  
   Users of CITRIX: (Total of 5000 licenses issued; Total of 1 license in use)  
     "CITRIX" v2002.0101, vendor: CITRIX  
     floating license  
       MPS mps_server1 MPS MPS_ENT_2004.0227 (v1.0)  
       (license_server1/27000 101), start Tue 3/16 16:59  
 
   Users of MPS_ENT_CCU: (Total of 30 licenses issued; Total of 1 license in use)  
     "MPS_ENT_CCU" v2004.1201, vendor: CITRIX  
     floating license  
     MPS mps_server1 MPS 25fb337e:MPSCLIENT  
     (v2004.0227) (license_server1/27000 203), start  
     Wed 3/17 11:56
The following represents a breakdown of the information contained in the MPS_ENT_CCU line of the lmstat output:
MPS citrix_product_name The name of the Citrix product that has the license checked out.
mps_server1 hostname Computer where the Citrix product is running.
MPS display

The name of the Citrix product that has the license checked out.

license_server1 server_host Computer where the license server is running.
27000 port TCP/IP port where the license server is running.
203 handle License handle. The license handle is a number used to identify a specific checked out license.
start Wed 3/17 11:56 checkout_time Time that this license was first checked out.
Note: lmstat -c@localhost -a can potentially generate a lot of network activity in systems with many product licenses checked out.

You can use lmstat -a to verify license check out data.

Display versions of binaries (lmver)

The lmver utility displays version information for the licensing binaries, such as the command utilities. One exception is the lmadmin utility. To display version information for the lmadmin utility, use lmadmin -version.

Syntax

lmver binary

Example

lmver lmdiag

Display or release licenses for users or devices (udadmin)

udadmin displays the licensed users and devices and releases licenses for specified users and devices.

You can release a license for a user only when the employee is no longer associated with the company or is on an extended leave of absence. You can release licenses for devices only when the devices are out of service.

Caution: Be aware that mass releases of licenses, prior to the automatic 90 day lease period, outside of the reasons highlighted above might violate the Citrix End User License Agreement (EULA). Before doing so, contact Citrix.

The udadmin command line help displays usage information only in English, but you can use the command on non-English systems.

Syntax

udadmin [-options] [-delete | -list ]  
Options Description
-f featurename When used with -list or -delete, displays or releases the license for only the user or device for the specified featurename.
-user username Releases the license for only the user specified by the username.
-device devicename Releases the license for only the device specified by the devicename.
-a Lists all features and versions installed on the license server.
Argument Description
-delete Releases the license for one user, feature, or device at a time.
-list Displays the users and devices with licenses and the time since the last update. The time to the next update appears if significant activity occurred within 15 minutes of the last report.
no argument or ? Displays usage information for the udadmin command.

Examples

  • udadmin -list

    Displays all the users and devices.

  • udadmin -list -a

    Lists all features, versions, counts of licenses, and the users and devices for each feature.

  • udadmin -f XDT_ENT_UD -user u8.08 -delete

    Releases one user from one feature.

  • udadmin -f XDT_ENT_UD -device dn01.88 -delete

    Releases one device from one feature.