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)\Citrix\Licensing\LS on a 64-bit computer
Table of commands
|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.|
|udadmin||Displays all licensed users and devices and deletes specified licensed users and devices. This command applies to User/Device licenses only. Note: Specifying
Format license commands
Formatting conventions for the license administration commands:
|Bold||A command or switch, such as lmstat.|
|Italic||Replace variables with a value. For example, in the expression: lmstat -c license_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 must be replaced.|
Valid arguments for most license administration commands:
|-all||Applies the command to all of the license servers on the network.|
|-c||Lets 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:
|-h||License handle, as reported by
|-help||Displays usage information and exits.|
|-s [server]||If server is not specified, displays the status of all license files listed on the license server or on all license servers.|
|-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 Virtual Apps server, Advanced edition licenses only by specifying MPS_ADV_CCU as an argument.
lmdiag -c license_file_list [-n] [feature[:keyword=value]]
|-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:
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, but lmdiag does not detect this problem. For example, a license server that does not have licenses for that product on it. 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:
- Stop the license service.
- Run lmadmin - allowStopServer and/or -allowRemoteStop Server.
- Restart the license server.
lmdown -c license_file_list [-vendor CITRIX] [-q] [-all]
|-c license_file_list or -c@localhost or -c@server||Use the specified license files. Specifying
|-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.
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.
Citrix Licensing, versions 11.5 and later for Windows allows you to display multiple host IDs if there are more than one host.
|-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.
lmreread -c license_file_list [-all] [-vendor CITRIX]
|-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.|
- 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.
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 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
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.
lmstat [-a] [-c license_file_list] [-f [feature]] [-i [feature] [-s[server] [-S [CITRIX]] [-t timeout_value]
|-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]||If *feature *is not specified, displays information from the INCREMENT line for the specified feature (product license) or all features.|
|-s [server]||If *server *is not specified, displays status of all license files listed on the license server or on all license servers.|
|-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 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 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
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.|
lmstat -c@localhost -a can potentially generate much network activity in systems with many product licenses checked out.
You can use
lmstat -a to verify license checkout 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.
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.
Mass releases of licenses, before the automatic 90-day lease period, outside of the reasons highlighted above might violate the Citrix 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.
|udadmin [-options] [-delete||-events||-export||-list||-times]|
|-f feature name||When used with -list or -delete, displays or releases the license for only the user or device for the specified feature name.|
|-user user name||Releases the license for only the user specified by the user name.|
|-device device name||Releases the license for only the device specified by the device name.|
|-a||Lists all features and versions installed on the license server.|
|-delete||Releases the license for one user, feature, or device at a time.|
|-events||Reports all events logged by the User/Device licensing for each feature sorted in chronological order.|
|-export||Exports all User/Device data into one .csv document. The first row is the column header. Feature and then user is the format. Every unique (user,deviceId,versionRequested) is reported on one line. Redundant licensing requests for the same (user,deviceid,versionRequested) are not displayed individually. The most recent request updates the timestamp.|
|-list||Displays the users and devices with licenses and the time since the last update. If significant activity occurred within 15 minutes of the last report, the time to the next update appears. Specifying -list -times generates output containing a timestamp.|
|-times||Specifying -list -times generates output containing a timestamp.|
|No argument or ?||Displays usage information for the udadmin command.|
udadmin -list -times
Usage data is 0 minutes old. Next update in 15 minutes.
u01.01 XDT_ENT_UD 2017.1201 (Thu Sep 14 13:41:07 2017)
u01.04 XDT_ENT_UD 2017.1201 (Thu Sep 14 13:41:07 2017) . . .
D.ADV.23 XDT_ADV_UD 2017.1201 (Thu Sep 21 18:31:01 2017)
D01 XDT_PLT_UD 2017.1201 (Tue Sep 12 14:30:33 2017)
udadmin -list -a
Lists all features, versions, counts of licenses, and the users and devices for each feature.
udadmin -f XDT_ENT_UD -device dn01.88 -delete
Releases one device from one feature.
In this article
- Table of commands
- Format license commands
- Universal arguments
- Diagnose checkout problems (lmdiag)
- Stop daemons (lmdown)
- Check host names (lmhostid)
- Reread license and options files (lmreread)
- Display the list of licensing utilities (lmutil)
- Determine licensing status (lmstat)
- Display versions of binaries (lmver)
- Display or release licenses for users or devices (udadmin)