Klocwork documentation


Klocwork University
View detailed technical videos on Klocwork tools on the Klocwork Universtity page.

License management and troubleshooting


Administrators face many license management challenges that can interfere with user productivity and software ROI. While these challenges aren’t specific to Klocwork Insight—they're common across the software industry—we recognize your frustration.

Specifically, this article discusses:

New license requirement for Insight 10

To run Insight 10, you will need an Insight 10 license (not an Insight 9.x license). Contact Customer Support if you need a new license.

Klocwork Release 9.x, 10.x: How to determine the FLEXlm host ID of your machine.

The Klocwork 9.x and 10.x License server uses FLEXlm licensing from Flexera Software. Your Klocwork license must be locked to your license manager server. In the simplest case, this will be the same machine running your Klocwork software. If you are evaluating or purchasing a Klocwork product you will need to provide your Klocwork contact with the FLEXlm host ID of your server. To determine your FLEXlm host ID use the lmhostid utility.

A) How to determine the FLEXlm hostid of a Windows machine:

  1. Download lmhostid.exe for Windows to your local filesystem (right-mouse click and 'Save As' file) to \Klocwork\Server x.x\3rdparty\bin (If you have used the default installation directory. Otherwise, use your custom path.)
  2. Click Start > Run.
  3. In the Open field type cmd and Enter
    A command window will appear.
  4. In the command window, cd to the location of lmhostid and run the utility. For example:

C:\>cd \Klocwork\Server x.x\3rdparty\bin
erver x.x\3rdparty\bin>lmhostid

B) How to determine the FLEXlm hostid of a Linux or Solaris machine:

  1. Download lmhostid for Linux or lmhostid for Solaris to your local filesystem (right-mouse click and 'Save As' file)
  2. In an xterm, cd to the location of lmhostid and run the utility. For example:

bash-2.04$ cd /usr/local/bin
bash-2.04$ ./lmhostid

Send the FLEXlm host ID to your Klocwork contact. If FLEXlm returns more than 1 host ID select one of them.

About Klocwork licenses

Klocwork license file

Klocwork Insight uses FLEXlm licensing from Flexera Software (formerly Macrovision). A Klocwork license file is locked to your license manager server. You may use your own FLEXlm server, or the License Server included in the Klocwork Server package.

To get your license from Klocwork Customer Support, simply provide the FLEXlm host ID, which you obtain by running lmhostid after you install the Klocwork Server package, as well as the host name of the machine where you installed the Klocwork License Server (or from your own FLEXlm server).

The license file contains information about your license server configuration, as well as what Klocwork products and features you are licensed to use.

When you have your license file, place it in the projects_root/licenses directory, or in your corporate license server folder if applicable, and start your License Server.

Types of licenses

Updated Jan 30, 2014

Specifically, the license file will indicate how many build and user licenses you purchased. Build licenses (listed in the license file as 'fixserver' or 'fixserver10')are used to run the Klocwork integration build analysis on a build server. Build licenses are node-locked to a host name or “fixed”. A fixed build license has a long linger period, generally two weeks (1,209,600 seconds).

User licenses (listed in the license file as 'fixclient' or 'fixclient10') are used by everyone who uses Klocwork tools. A user license (sometimes called an "individual" license) has a linger time of 7 days (604,800 seconds). "Linger" is the amount of time after the last use of a license before it is free for another user to check out. Note that linger times start at the end of the inactivity time-outs that some Klocwork components have.


Prevention strategies and customization considerations

The right licensing mix is determined by the size of your organization. Sounds simple, right? But there are a number of customizations you can consider to get the most out of the licensing you have in place and minimize user disruptions.

Perhaps your workforce is growing and you need to re-jig your mix of build and user licenses. Feel free to contact Klocwork Customer Support (support@klocwork.com). They can get you started on the right licensing path and prevent future problems down the road.

What are your options? Here are some scenarios to consider:

Using your own FLEXlm server

If you will use your organization's FLEXlm license server rather than the license server packaged with Klocwork Insight, you must configure Insight and the FLEXlm license server to work together, and you must put your Klocwork license file in the right place.

Insight supports version or greater of lmgrd, the FLEXlm license manager daemon.

Read more at Using your organization’s FLEXlm server.


Large, multi-national organizations may want to tweak the licensing timeout period to better accommodate overseas users of client tools.

If the machine consuming a license (for example, using kwcheck or kwbuildproject) is a Windows machine and the configured port is in the 27000-27009 range, you can set the FLEXLM_TIMEOUT system variable to 10000000 microseconds. This is the more typical value, but you can set the value to 30000000 microseconds for networks with long delays.

Reserving licenses

You can reserve licenses to set up a combination that enables certain people to always have access to a user license or that a particular server always has access to a build license.

This type of customization is more typical for large deployments where there’s a separation between the roles of the Klocwork administrator and the Klocwork user.

Reserving licenses requires an options file. For more information, see Reserving licenses.

If your License Server changes

If you need to change any aspect of a server's network setup that will affect its IP address and/or its fully qualified host name:

  1. Stop the Klocwork Servers
  2. Make a backup copy of your license file
  3. Edit the license file to change the host name or IP address to the new host name or IP address
    Note: You can change the host name, but not the host ID of the License Server
  4. Communicate the changes to client tool users
    Tip: Some customers have their client tool users (particularly those on Windows), uninstall the User packages and re-install the User packages, adding the updated hosts and ports during the installation process. The desktop shortcuts to Klocwork Review and the installed help are then updated automatically to point to the correct host and port.

For more information, see Viewing and changing Klocwork server settings

Handy license management tools

Flexera license management utilities are installed with the Klocwork Server package in the 3rdparty/bin directory.

Three license management tools that we use a lot here at Klocwork are explained below.


Returns the FLEXlm ID for your machine. The ID is a unique alpha-numeric string. Remember how we said that your license file is locked to your license manager server? Well, this command returns the host ID you need to provide to support to get your license file.

Here's an example of what to provide to the support team to get your license file:

  • license server host name: klocwork01.company.com
  • license server host ID: ac23e8f97616

If lmhostid returns more than one host ID, run "ipconfig /all" on Windows or "ifconfig" on Unix to get more information. Select the ID associated with your Local Area Connection (NOT wireless).

For more information, see Getting a license.


Checks how many licenses you have in use. You can check license use by feature (Klocwork component).


lmstat  -c 27000@klocwork01.company.com -f review 


  • -c specifies the License_Server_port@License_Server_host
  • -f refers to the Klocwork feature (or component), which in this case is Klocwork Review; a list of possible features for build and user licenses are below:

For Release 10.0, the common features are


  • kwadmin10
  • kwbuildproject10 


  • kwcheck10 
  • plugin.eclipse10
  • plugin.idea10
  • plugin.msvs10 
  • review10
  • cahoots10

For more information, see Finding out how many licenses are in use.


Keeps license.log files from becoming too large. You can run the lmswitch command automatically using the Windows Task Scheduler or a cron job on Unix.

For more information, see Switching the licensing debug log to reduce file size.

Troubleshooting licensing

Check the license log file

For licensing issues, you can always pull more information from error messages in the log file. If you are not running a corporate license server, the log file is located in <projects_root>/logs/license.log.

If you are running a corporate license server, look at the logs on that server to determine the cause of the failure.

Can’t connect to License Server

Strategies for dealing with the error message, "Can't Connect to License Server (-15)" are provided in this wiki article, Can’t connect to License Server.

No Klocwork plug-in license available (out of licenses?)

The cause may simply be that the License Server isn’t running, which is one of the possible scenarios discussed in the above linked article.

Other possible causes are:

  • The desktop user has the wrong License Server settings configured. Information about how to access License Server settings in Visual Studio, Eclipse, IntelliJ IDEA, Klocwork Desktop and kwcheck are provided in Desktop licensing problems.
  • The user may need to wait until a license is returned by another user. For more information about inactivity time-out periods, see Why can’t I get a license?
  • All licenses are in use and more licenses are required for your team or organization. To see how many licenses are in use, use the FLEXlm tool lmstat, which is installed with the Server package. For more information, see Finding out how many licenses are in use. If you need more licenses, contact Klocwork Support at support@klocwork.com.
  • A license is stuck and has not been returned to the pool of available licenses because one of the Insight tools terminated unexpectedly. See Releasing stuck licenses.

Default License Server and vendor daemon ports not open

The License Server requires two ports to be opened on a server: the License Server port (default 27000) and the vendor daemon port (default 33133).

1. Verify that the License Server port is open:

 telnet <license_server_host_name> 27000 

2. If the connection is refused, have your IT person verify that the port is open for connection and also that the lmgrd license server is actually listening on this port. If the port is not available, get your IT admin to open the port. If the port is not available because of a firewall, then run the License Server on another port other than 27000. See Viewing and changing Klocwork Server settings.

3. Verify that the vendor daemon port is open:

 telnet <license_server_host_name> 33133 

4. If the connection is refused, have your IT person verify that the port is open for connection and also that the Klocwork license daemon is actually listening on this port. If the port is not available, get your IT admin to open the port. If the port is not available because of a firewall, then you need to edit your license file. See Changing the vendor daemon port in your license file.

License Server not running because of host ID mix-up

Klocwork license files are host ID specific. If the License Server is not running because the license file was placed on a machine that has a different host ID than the one identified in the license file, you must either:

  • Put the license file on the machine for which it was intended, or
  • Contact Klocwork Support (support@klocwork.com) and provide the host ID of the machine, so you can be issued a new license file.

If the problem is a host ID mix-up, then the error in your license.log will look something like this:

14:08:48 (klocwork) Wrong hostid on SERVER line for license file: 
14:08:48 (klocwork) ./projects_root/licenses/license.lic 
14:08:48 (klocwork) SERVER line says xxxxxxx, hostid is yyyyyyyyyyyy 
14:08:48 (klocwork) Invalid hostid on SERVER line