Application usage metering using the FlexNet inventory agent

Community Manager Community Manager
Community Manager
14 6 963

Being able to meter the usage of applications is very helpful to understand where applications are deployed but not used, where applications may be able to be uninstalled to reclaim licenses, where applications are being used heavily, and more. Recently our team has spent some time reviewing and confirming a range of details about application usage metering using the FlexNet inventory agent. I thought I'd share some of the learnings and insights here.

With that in mind, this post covers the following questions:

  1. What processes can the FlexNet inventory agent meter usage for?
  2. What are key recommendations for deploying and configuring FlexNet Manager Suite to get best usage m...
  3. What configuration settings are available to enable usage metering?
  4. How can the values of configuration settings be changed?
  5. What are "manual mapper" configuration settings?
  6. Where can I see usage information in the FlexNet Manager Suite UI?
  7. When will a recognized application installation be marked as "used" based on metering data?
  8. Why are "Last used date" values on recognized installations always the start of the week?
  9. Why are "Software name" & "Version" details on the "Raw Software Usage" page empty?
  10. Why is the "Total active time" in raw software usage appearing as 0?
  11. What diagnostic information is available to understand usage metering behavior?
  12. What limitations are there related to usage metering?
  13. Where can I find more information about usage metering?

If you have further questions that are not answered here, post a comment on this post or in the FlexNet Manager forum!

What processes can the FlexNet inventory agent meter usage for?

On Windows, usage can be metered for processes running executables that meet one or more the following conditions:

Process can be metered if its executable…

Notes

…is included in a Windows Installer (MSI) package that has been installed for all users

The executable must be in the installation path of one of the components that have been installed by the MSI package.

…is located under the installation directory identified for an application in the "local machine" 32-bit Add/Remove Programs registry settings

These registry settings appear under the HKEY_LOCAL_MACHINE\SOFTWARE\ WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall key.

…is located under the installation directory identified for an application in the "local machine" 64-bit Add/Remove Programs registry settings

This requires the FlexNet inventory agent version 14.2 (from release 2019 R2.2) or later.

These registry settings appear under the HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Windows\CurrentVersion\Uninstall key.

…is explicitly configured for metering in the application usage component's "manual mapper" configuration settings

See the question "What are "manual mapper" configuration settings?" for more details.

 

On Unix-like operating systems, usage can be metered for any process that is running an executable included in the list of files installed by the native packaging technology for the operating system (RPM for Linux, llp for AIX, etc.)

What are key recommendations for deploying and configuring FlexNet Manager Suite to get best usage metering results?

General recommendations are:

  1. Use the FlexNet inventory agent version 14.2 (from release 2019 R2.2) or later. This version contains latest improvements available for metering usage, as referenced elsewhere in this post.
  1. For FlexNet Manager Suite On-premises deployments, use release 2020 R1 or later (once available) on your servers. This release contains an improvement to be able to import additional usage data based on file evidence compared to earlier releases (see item IOJ-2114072 under "What limitations are there related to usage metering?" below).
  1. Set the following application usage component configuration settings (as described under "How can the value of configuration settings be changed?" below):
    • Disabled=FALSE
    • UseAddRemove=TRUE

What configuration settings are available to enable usage metering?

The following configuration settings can be set to control which processes are metered by the application usage component:

Setting

Description

Disabled

Set to "TRUE" (the default) to turn off all usage metering. Set to "FALSE" to turn on usage metering. Other configuration settings further control which processes are metered.

UseMSI

Set to "TRUE" (the default) to meter usage of processes running executables installed by a Windows Installer (MSI) package that is installed for all users. Set to "FALSE" to turn off this metering. This setting applies only to Windows.

UseAddRemove

Set to "TRUE" to meter usage of processes running executables that are under installation directories identified in the "local machine" Add/Remove Programs registry settings. Set to "FALSE" (the default) to turn off this metering. This setting applies only to Windows.

Version 14.2 (from release 2019 R2.2) or later of the FlexNet inventory agent must be used to include 64-bit Add/Remove Programs entries with this. All versions of the agent include 32-bit entries.

UserProcessesOnly

Set to "TRUE" (the default) to only meter processes running as users other than SYSTEM (on Windows devices) or root (on UNIX-like devices). When set to "FALSE", processes running as any user are metered.

UseManualMapper

Set to "TRUE" to enable the use of "manual mapper" configuration settings. Set to "FALSE" (the default) to ignore any manual mapper settings that may be configured. See the question "What are "manual mapper" configuration settings?" for more details.

 

A typical set of configuration setting values used for tracking metering is as follows:

Setting

Value

Is this the default value?

Disabled

FALSE

No

UseMSI

TRUE

Yes

UseAddRemove

TRUE

No

UserProcessesOnly

TRUE

Yes

UseManualMapper

FALSE

Yes

How can the values of configuration settings be changed?

For the FlexNet inventory agent running on Windows operating systems, configuration settings appear under the HKLM\SOFTWARE\WOW6432Node\ManageSoft Corp\ManageSoft\Usage Agent\CurrentVersion registry key. For example:

image.png

For the FlexNet inventory agent running on UNIX-like operating systems, configuration settings are stored in the file /var/opt/managesoft/etc/config.ini which can be modified by running the mgsconfig command as described in the Gathering FlexNet inventory PDF guide.

You may have tools available in your organization that can be used to set registry entries on Windows computers, or run the mgsconfig command to configure settings on UNIX-like operating systems. If so, using those tools to set these values may be an effective approach for you.

Alternatively, FlexNet Manager Suite provides a few options for setting these registry entries:

  1. On Windows, registry values can be set at the time the FlexNet inventory agent is installed by specifying values in the mgssetup.ini file used with the agent installer. Here is an example of settings specified in the mgssetup.ini file in this way:
    [Usage Agent]
    desc0 = Disabled
    val0 = False

    desc1 = UseAddRemove
    val1 = True​
  2. Configuration setting values can be managed centrally in the FlexNet Manager Suite database and deployed to computers through FlexNet inventory agent policy. If you are using FlexNet Manager Suite Cloud, you will need to log a case with Flexera Support to request the configuration be applied to your tenant (refer to this description in your case). If you are using FlexNet Manager Suite On-premises, this can be achieved by running SQL statements such as the following against your compliance database:
    -- Ensure built-in "Target__windows" (representing all client computers running
    -- Windows operating systems) exists. "Target__unix" can be used here instead
    -- to represent all computers running UNIX-like operating systems.
    EXEC dbo.BeaconTargetPutByNameInternal
    @Name = 'Target__windows',
    @Internal = 1,
    @Description = NULL,
    @Visible = 0

    -- Get the ID of the target to have settings applied
    DECLARE @btid INT

    SELECT @btid = BeaconTargetID
    FROM dbo.BeaconTarget
    WHERE Name = 'Target__windows'

    -- Add UseAddRemove=true setting to agent policy for computers
    -- covered by the above target
    EXEC dbo.BeaconTargetPropertyValuePutByKeyNameBeaconTargetID
    @KeyName = 'CUsageAgentUseAddRemove',
    @BeaconTargetID = @btid,
    @Value = 'true'

    -- Force beacons to update to get latest settings containing the above changes
    EXEC dbo.BeaconPolicyUpdateRevision​


    The value of the @KeyName parameter used when calling the BeaconTargetPropertyValuePutByKeyNameBeaconTargetID stored procedure should be the name of the setting to be configured appended to "CUsageAgent" (for example, "CUsageAgentUseAddRemove", "CUsageUserProcessesOnly", etc).

  1. The value of the Disabled setting deployed through to agents through policy can be managed in the FlexNet Manager Suite UI by creating a target under Discovery & Inventory > Discovery and Inventory Rules. Configure the target to cover the devices you want the setting to apply on, and select one of the following Application usage options according to your need:
    1. Allow application usage tracking on these targets: Sets Disabled to "FALSE" (so that usage is metered).
    2. Do not allow application usage tracking on these targets: Sets Disabled to "TRUE" (so that usage is not metered).

What are "manual mapper" configuration settings?

"Manual mapper" configuration settings can be set for situations where use of an executable you are interested in is not otherwise being metered. This technique primarily applies to Windows computers.

To use manual mapper configuration settings, you must first arrange to set the UseManualMapper configuration setting to "TRUE" on each computer running the FlexNet inventory agent. (See the question "How can the values of configuration settings be changed?" for suggestions on how to do this.)

Executable files to meter usage for can then be configured by creating registry entries similar to the following (this example is to meter usage of javaw.exe processes):

image.png

For each executable to be metered, create a registry key with a name of your choice under HKLM\SOFTWARE\WOW6432Node\ManageSoft Corp\ManageSoft\Usage Agent\CurrentVersion\Manual Mapper. Then configure the following REG_SZ registry entries in the key you have created:

  • ExecutablePath: Specify the path and filename of the executable to be metered. This is specified either as an exact value or a regular expression, depending on the value of the Regex entry.
  • Regex: Set to "TRUE" if the ExecutablePath value is a regular expression, or "FALSE" if ExecutablePath is an exact value.
  • Application: Specify an application name for the executable. This will be used as installer evidence when usage data is imported into FlexNet Manager Suite.
  • Version: Specify a version number for the executable. This will also be used as installer evidence.

Registry settings are discussed here must be configured using tools and processes available within your organization to deploy the relevant setting values to your client computers. Agent policy or the FlexNet Manager Suite UI cannot be used to configure these settings.

Where can I see usage information in the FlexNet Manager Suite UI?

Low level details of metering data gathered by the FlexNet inventory agent can be found on the Discovery & Inventory > Raw Software Usage page. For example:

image.png

Recognized installations have "Used" and "Last used date" fields which are populated according to imported metering data. These fields are available in many parts of the UI where details of an installation are shown. For example, when viewing installation details on the Devices tab of an installation record:

image.png

When will a recognized application installation be marked as "used" based on metering data?

A recognized installation of an application on an inventory device in FlexNet Manager Suite is flagged as "used" when:

  1. Usage metering data has been uploaded from the inventory device that meets minimum thresholds specified on the application; AND
  2. Appropriate installer or file evidence is linked to the application to recognize application name/version/publisher (aka "installer evidence") or file details that match the usage metering data.

Minimum thresholds for identifying an installation of an application as used are shown on the Usage tab when viewing the application record in the FlexNet Manager Suite UI (the settings shown in this screenshot are the defaults for all applications unless changed):

image.png

Why are "Last used date" values on recognized installations always the start of the week?

Metered usage data from the FlexNet inventory agent is aggregated by week to optimize storage and data processing resource consumption. Hence last used dates of usage should be interpreted to referring to the week when usage occurred, not a specific day.

Why are "Software name" & "Version" details on the "Raw Software Usage" page empty?

This indicates that the FlexNet inventory agent did meter some usage of the identified executable, but it was unable to definitively associate the executable with a specific installed software package. An example of why this may be the case is because the executable exists under a directory that is identified as the installation directory for multiple packages (which is not uncommon with some Microsoft Office and Adobe products).

In this situation, a file evidence recognition rule (rather than an installer evidence recognition rule) will be required on the appropriate application in the Application Recognition Library in order to identify installations of the software as used.

Why is the "Total active time" in raw software usage appearing as 0?

For UNIX-like platforms, is not possible or meaningful to effectively identify when an application is "active". For Windows platforms, security improvements after Windows XP removed the capability to identify when a window is active. Therefore the "Total active type" column on the "Raw Software Usage" page only displays a non-zero value when you are tracking usage for applications running on Windows XP or earlier versions of the operating system.

What diagnostic information is available to understand usage metering behavior?

Logging from the FlexNet inventory agent's application usage component can be found in the following files:

  1. On Windows operating systems: %TEMP%\ManageSoft\usageagent.log (where "%TEMP%" is the system temporary directory, which is commonly C:\Windows\Temp)
  2. On UNIX-like operating systems: /var/opt/managesoft/log/usageagent.log

These logs contain details of executables where usage will be metered, processes where usage has been metered. Here is an example of logging as it may appear:

[1/15/2020 1:01:26 PM (G, 0)] {8724} Adding product 'Self-service Plug-in' (priority 10) to product cache
[1/15/2020 1:01:26 PM (G, 0)] {8724} Adding file 'C:\Program Files (x86)\Citrix\Online Plugin\SelfServicePlugin\SelfServicePlugin.exe' to product 'Self-service Plug-in'
[...]
[1/17/2020 2:06:55 PM (G, 0)] {8724} Session logging: KNOWN PRODUCT Session start (Path: C:\Program Files (x86)\Citrix\Online Plugin\SelfServicePlugin\SelfService.exe, Product: Self-service Plug-in, Product version: 4.9.6000.5) Session will be added to cache on completion
[...]
[1/17/2020 2:08:56 PM (G, 0)] {8724} Session logging: KNOWN PRODUCT Session end (Path: C:\Program Files (x86)\Citrix\Online Plugin\SelfServicePlugin\SelfService.exe, Product: Self-service Plug-in, Product version: 4.9.6000.5, Run time: 120.341248400 seconds) Session was added to cache.

What limitations are there related to usage metering?

Here are some known limitations related to usage metering to be aware of:

Description

Affected FlexNet Manager Suite versions

Processes from executables that don't meet the conditions described in the section "What processes can the FlexNet inventory agent meter usage for?" are not metered.

As one example, metering will typically not be done for applications that are installed on a "per-user" basis on Windows computers (unless manual mapper configuration settings are explicitly used to identify such executables).

All

Usage may not be metered for executables under installation directories identified in 64-bit Add/Remove Programs registry settings (IOJ-2111789)

All agent versions before 14.2 (from release 2019 R2.2)

Usage may be reported against the wrong application if multiple applications have the same install directory identified in Add/Remove Programs registry settings (IOJ-2111792)

All agent versions before 14.2 (from release 2019 R2.2)

An installation may not be shown as used if usage recognition depends on a file evidence recognition rule (IOJ-2114072)

All FlexNet Manager Suite on-premises server versions from 2015 to 2019 R2

This problem no longer affects FlexNet Manager Suite Cloud

Installations of suite applications may not be reported as used when component applications have been used (IOJ-1771160)

All

Usage data for .exe files with a file version value longer than 32 characters may be ignored by import process (IOJ-1890554)

All

User's domain may be reported as the computer's domain in usage metered by the FlexNet agent (IOJ-1899773)

All

Where can I find more information about usage metering?

The following resources may be useful for more information:

6 Comments
Rising star

Hi Chris,

Great compilation. I have some questions:

  • I think in an earlier discussion regarding the limitations of pre 2019 R2.2 agents, it was mentioned that an updated agent might be available for on prem customers. Did the fixes/changes only affect the agent or has the server application/db schema chnaged as well? If not, will there be an updated agent release before 2020 R1 on prem?
  • The mentioned "Version = All" value for the manual mapper, does it result in the actual file version value being reported? Because when trying to use a wildcard (*), that character got reported as a result and made it impossble to distinguish between different versions.
  • When looking at the ManageSoft Reader, there's some "crosstalk" between Usage and FileEvidence sections (#RelevantSoftwareFile). At this point, I don't think discovering the executables via file scan is necessary for usage metering to work, but maybe you can share your thoughts on this?

Best regards,

Markward

Community Manager Community Manager
Community Manager

Hi @mfranz,

A few thoughts:

  1. The latest agent available at this point in time for download with FlexNet Manager Suite on-premises is the 14.0 version from FlexNet Manager Suite 2019 R2. For Flexera partners who work with both FlexNet Manager Suite Cloud and On-premises, the 14.2 agent version from the Cloud environment could strictly be downloaded and used with an On-premises deployment. The next on-premises release which will include the agent latest improvements is in the process of cooking. Stay patient!

  2. When using manual mapper configuration, version details from the WinPE header details on Windows can't be used for the application version. The exact version value that you specify in the "Version" registry entry is what gets returned and imported as installer evidence. In order to have different versions identified, you would need to be able to have different manual mapper entries that have different "ExecutablePath" values which somehow match to different versions (maybe based on path, or based on filename). However in practice I expect it would be difficult to manage this. If different versions of the software install an executable with the same name and same path then the best you will be able to do will be to identify something like "All" or "*" as the version.

  3. I'm a little vague on the crosstalk you mention in the ManageSoft reader, but my starting guess is similar to your thinking here: I believe it is generally not necessary to gather file details as part of inventory for usage metering to work.
Occasional contributor

Hi @ChrisG ,

I have question here. There is also an option through Discovery and Inventory Rules( while specifying targets use option application usage option to allow tracking). 

Does that also work that same way in terms of usage collection or it is a workaround to be able collect usage on specific subnets/ranges only?

Community Manager Community Manager
Community Manager

@savin_shetty1 - I think you are referring to the "Application usage options" setting detailed at item #3 under the question "How can the values of configuration settings be changed?" in this post.

This setting can be used to enable/disable usage metering on agents running on computers covered by target(s) you configure.

If you want to enable usage metering on all computers, you could use this approach and configure a target to cover all IP address. An approach I've used for this is to configure a target covering 2 IP address ranges: "0.0.0.0/1" and "128.0.0.0/1". (Don't try to configure the range "0.0.0.0/0" as the UI won't allow a suffix of "/0".) Alternatively, if you just want metering enabled on a subset of devices, configure the target appropriately to cover those devices.

Occasional contributor

Hi @ChrisG ,  Do we have flag to check if application metering is enabled based on device from UI side?  I know we could check that by application name, but i would like to know if metering is enabled on device level.  From what i know we can check this from usageagent.log from the device, but considering i have couple of devices to be checked over, is there a simple method or flag available in UI which identifies the same?

Community Manager Community Manager
Community Manager

@savin_shetty1 - I can't think of any way in the UI to directly check whether gathering of usage metering data is enabled in the configuration on a specific device, but you could get an indication of whether any metering data has been reported by a device by filtering/searching for that device in the Discovery & Inventory > Raw Software Usage page.

Melbourne, Australia