ARM Technical Support Knowledge Articles

How can I tell how many licenses are in use?

Applies to: ARM Developer Suite (ADS), DS-5, RealView Development Suite (RVDS), Tool Licensing (License Management)


The number of seats in use "now"

To find out how many floating license seats are in use at a given point of time, you should run the command

lmutil lmstat -a

on the server. Note that the license server log is not intended to be used for usage reporting, and this is stated in the log header text.

The output from the lmstat utility will look similar to this:

C:\\Flexlm>lmutil lmstat -a
lmutil - Copyright (c) 1989-2006 by Macrovision Corporation. All rights reserved.
Flexible License Manager status on Tue 6/2/2009 13:50

[Detecting lmgrd processes...]
License server status: 8224@myserver
    License file(s) on myserver C:Licensesmylicensefile.txt:

    myserver: license server UP (MASTER) v10.8.8.0

Vendor daemon status (on myserver):

    armlmd: UP v10.8.8.0

Feature usage info:

Users of rvd_arm:  (Total of 10 licenses issued;  Total of 1 license in use)

  "rvd_arm" v4.0, vendor: armlmd
  floating license

    ngnere clientpc CLIENTPC (v4.0) (myserver/8224 301), start Thu 6/2 14:01

Users of rvd_rtos:  (Total of 10 licenses issued;  Total of 0 licenses in use)

Users of rvd_trace:  (Total of 10 licenses issued;  Total of 0 licenses in use)


In this example, at the time the time the command was run, there were 10 seats in total for the rvd_arm feature and one of these was being used by the user "ngnere" on the computer "clientpc".  This leaves 9 seats free. 

The maximum number seats in use over a period of time

The lmstat command only gives the usage that moment in time.  What can be useful to know is the maximum number seats that were checked out during a given time period - for example during an overnight build.  The lmstat command does not give this information, but there ways in which it can be estimated.

1) lmstat

By writing an appropriate script, you can run the lmutil lmstat -a command on a regular basis and then analyse the output using a text parser, so that the number of users of a particular FEATURE or INCREMENT line over a period of time can be determined.  You will need to decide how frequently you take a license usage snapshot and balance that against how much CPU time is needed to collect those data.

An example script of how this can be done is available for download below.

   Zip file icon lmstat Parser (example script)

2) Log file

The license server logs all license check-outs and check-ins.  The log file name is specified when starting the license server (lmgrd -c <license file> -l <log file>).  Here is an example extract:

(armlmd) IN: "compiler"  user@client
(armlmd) OUT: "compiler" user@client
(armlmd) OUT: "armlink" user@client
(armlmd) IN: "compiler" user@client
(armlmd) OUT: "compiler" user@client
(armlmd) IN: "compiler" user@client
(armlmd) OUT: "compiler" user@client
(armlmd) IN: "compiler" user@client
(armlmd) OUT: "compiler" user@client

This log can be parsed by a script to calculate the maximum number of checked-out seats for a given feature/increment.  Below is an example available to download below:

   Zip file icon log file parser

This approach does have a number of limitations.  In particular it relies on you having the complete server log, as the script relies on counting all the check-outs and check-ins to get an accurate result. 

If you want to analyse seat usage for a particular time period it helps to have a log file that only covers that period.  This could be done by re-starting the server, but this is not always possible/convenient.  The alternative is to use the lmswitch command to start a new log file.  Please refer to the FLEXnet End User Guide for information on the use of this command.

NOTE: The perl scripts provided as part of this FAQ are provided "as is" and without support entitlement.

Attachments: ,

Article last edited on: 2013-01-29 09:56:19

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential