Finding out how many licenses are in use

To find out how many licenses are in use, use the FlexNet Publisher utility lmstat. lmstat is installed with the Server package.

From <server_install>/3rdparty/bin, run:

lmstat -a -c <license_server_port>@<license_server_host> -f <feature_name>

Understanding the lmstat output

You need to pay attention to two keywords:

  • The server keyword shows total build license consumption.
  • The client keyword shows total user license consumption.

The label used for the license type may differ in your license file. The examples here use "server" and "client". Your license file may use other labels, such as "fixserver", "concserver", "fixclient", and "client".

Example lmstat output

Here's an example snippet from the lmstat output, showing total build, user, and web service license consumption:

Users of fixserver2022:  (Total of 5 licenses issued;  Total of 4 licenses in use)

"fixserver2022" v22.1, vendor: klocwork
individual license

tyoung host01 /dev/tty (v22.1) (flex1.artful.com/27000 57756), start Thu 4/04 12:17 (1203304/1209600)
jfall host02 /dev/tty (v22.1) (flex1.artful.com/27000 17731), start Fri 4/04 12:18 (1203244/1209600)
jfall host03 /dev/pts/1 (v22.1) (flex1.artful.com/27000 29438), start Thu 4/04 12:19 (1203184/1209600)
jfall host04 /dev/tty (v22.1) (flex1.artful.com/27000 12791), start Thu 4/05 12:17 (1116844/1209600)

Users of fixclient2022:  (Total of 10 licenses issued;  Total of 5 licenses in use)

"fixclient2022" vv22.1, vendor: klocwork
individual license

ajones ajones01 ajones01 (v22.1) (flex1.artful.com/27000 55789), start Thu 4/11 12:17 (598504/604800)
ayeats ayeats01 ayeats01 (v22.1) (flex1.artful.com/27000 10557), start Thu 4/11 12:18 (598444/604800)
bsmith bsmith01 /dev/tty (v22.1) (flex1.artful.com/27000 47368), start Thu 4/11 12:19 (598384/604800)
pwall pwall2 /dev/tty (v22.1) (flex1.artful.com/27000 34499), start Fri 4/12 12:17 (512104/604800)
tyoung tyoung02 /dev/tty (v22.1) (flex1.artful.com/27000 32739), start Fri 4/12 12:18 (512044/604800)

Users of web.service2022:  (Total of 3 licenses issued;  Total of 1 license in use) 

"web.service2022" v22.1, vendor: klocwork

The line Users of server: (Total of 5 licenses issued; Total of 4 licenses in use) shows that four out of the five available fixed server licenses are currently in use. The line beginning with "tyoung" shows us that user "tyoung" checked out a build license on the machine named "host01" at 12:17 p.m. on Thursday, April 4. Because build licenses are node-locked, the user "jfall" has consumed three build licenses: one for each machine they're using.

The Users of client line precedes the license usage details by user and host. Five out of the 10 client licenses are currently in use. User licenses are reserved for a unique user.

The users of web.service line shows that one instance of the Klocwork Server is running. Two licenses are still available.

The output of lmstat will show other license features like kwadmin, review, and kwcheck. With the exception of language and optional stand-alone features, these are sub-features of the server and user licenses.

Check license usage by feature

You can check how many licenses are in use for a Klocwork feature (or component), such as Klocwork Static Code Analysis by using the -f <feature_name> option with lmstat.

Build license features

To check license usage for this build component (feature) Enter this argument
Admin tool for integration projects and builds kwadmin2022
Analysis tool for integration builds kwbuildproject2022
Structure101 builds kws101build

User license features

To check license usage for this client component (feature) Enter this argument
Klocwork Code Review cahoots2022
Desktop command-line analysis tool kwcheck2022
Desktop plug-in for Eclipse plugin.eclipse2022
Desktop plug-in for IntelliJ IDEA plugin.idea2022
Desktop plug-in for Visual Studio plugin.msvs2020
Klocwork Static Code Analysis review2022
Structure101 Studio tool kws101client

Web service license features

To check license usage for this component (feature) Enter this argument
Web service web.service2022

Concurrent license features

To check license usage for this build component (feature) Enter this argument
CI agent kwciagent2022