How Klocwork licensing works

License server installation and setup is outlined in Installing Validate and explained in detail in Using your organization's Reprise server.

License Types

Perforce Static Analysis tools have the following basic types of licenses:

  • Build licenses: for centralized production of analysis results, such as CI/CD systems.
  • User licenses: for users to consume analysis results centrally (Validate portal user licenses), and to run their own desktop analysis checks using the IDE plug-ins and desktop GUIs (Klocwork Desktop user licenses).
  • Validate platform licenses: used to run instances of Validate servers.
  • Language licenses: permission-based licenses for language support, such as C, C++, and Java.
  • Compliance Module licenses: permission-based licenses for compliance modules, such as MISRA C, CERT C++, and CWE.

The following sections explain each of these license types in detail.

Build licenses

A build license allows you to run full, incremental, or partial command-line based analysis jobs for any supported languages before loading the results to the Validate Server database. Build licenses are either floating or fixed.

Fixed or floating Build licenses

Fixed (node locked) build licenses are designed for use on a single, dedicated physical or virtual build server machine. The license is locked to the machine and will stay with that machine for a locking period of two weeks. You need this license type to install and run analysis on a dedicated machine. For example, this is usually required for a single project group with a specific build machine.

Floating (concurrent) build licenses are designed for use with provisioned build systems (such as Perforce Puppet) where the build agent virtual machines or containers are created through the CI/CD pipeline and destroyed at the end of the process. Each new pipeline uses a new machine ID, therefore floating licenses count how many of these jobs are running in parallel at any given time: one floating build license allows one analysis job to run at any given time, two floating build licenses allows two analysis jobs to run at any given time, and so on.

To have a mix of fixed and floating build licenses in the license pool, you need to reserve licenses specifically intended for the fixed build hosts.

What tools consume a Build license?

  • kwadmin and validate admin (when loading analysis)
  • kwbuildproject
  • kwciagent

User licenses

There are two types of user licenses:

  • Desktop user license: allows you to access the desktop tools (such as Klocwork Desktop, the command-line tools, and the IDE plug-ins).
  • Validate user license: allows you to log in to Validate.

A standard user license (full Klocwork user license) provides both a Desktop user license and a Validate user license.

Departments such as quality assurance that work exclusively within a CI/CD system, or require access to Validate to overview the analysis status and project compliance, may choose to have a Validate user license only.

How user licenses work

When a license is checked out by a user based on their username, it is reserved for them until freed. A user can use their license whenever they want and on any machine, as long as they are logged in with the same user ID.

If you have different user IDs when you log in to different operating systems, a license will be consumed for each. For example, if your Windows authentication system requires you to log in with the user ID John.Smith, but your Linux system uses jsmith because it is not connected to the same corporate authentication system, two user licenses will be consumed.

What tools consume a user license?

The following tools consume a Desktop user license (kw_desktop_user):

  • Klocwork Desktop (kwgcheck)
  • The Klocwork IDE plug-ins
  • The command-line tools (kwcheck)

The Validate portal requires a Validate user license (validate_user).

How user licenses are released

User licenses are named by default and are held indefinitely for each user. A license can be released immediately with no wait period, by using RLM License Manager.

Once a license is released from a specific user ID, the same user cannot reclaim the license for a period of 10 days.

This option is ideal for smaller installations of less than 50 users, as it provides the license managers with ultimate control.

Automatically freed user licenses

For larger installations of 50 or more users, an option to automatically free licenses is available to help with maintaining the named user list. Any unused user licenses will be automatically freed after seven days of inactivity. Unlike standard licenses, automatically freed licenses are not restricted from using the previous user ID for a 10-day period after release.

Validate portal license

A Validate portal license allows you to run the Validate Server.

How the web service license works

After you install the Validate package, you will need to start the Validate Server, which requires a web service license. Validate releases the license when you stop the Validate Server. Each running instance of a Validate Server (one per projects_root directory) consumes a Validate portal license.

The validate service tool can consume a web service license.

Summary of license types

For a summary of the license types available, see Klocwork license tokens.