Metering of application usage

Snow Inventory Agent for Windows can meter the usage of desktop applications, web applications, and cloud applications.

Metering of desktop application usage

The primary focus of metering is desktop applications. Metering of usage is performed whenever a Windows process is running. Processes are measured whether the application is open on the desktop or running in the background

The following metadata is uniquely gathered per process:

  • file name

  • if the process is local

  • if the process is virtual

  • virtual app package name

  • username

  • date

  • file version info

  • usage data type (web, RDP, or VDI).

Since the main purpose of metering is to measure the usage of desktop applications, processes are not regarded as running when the screen is locked. This means that scheduled tasks, anti-virus software, and other processes executing in the background will not be regarded as used while the screen is locked.

Application usage (the run-count) is calculated as follows:

  • The agent will check for events every 15 seconds (default value).

    Use the wmi.poll_interval setting in the agent configuration file to change the interval; 5 seconds is minimum and 120 seconds is maximum.

  • The agent increases the run count of an application only when it gets notified of a start event. If an application is started before the agent is running, that application will get a run count of "0".

  • When a scan is performed and the inventory result file is created, the run count will be set to "1" if the run counts reported from the agent sum up to "0".

  • When multiple instances of the same application are started, the agent counts all individual run starts during that session. However, the total duration will be counted from when the first instance is started until the last instance is closed.

  • A scheduled scan will contain all metering information that has been gathered since the last scheduled scan. A scheduled scan will clear all temporary metering files stored on disk, and new ones will be created after the scan with a run count of "0".

  • A manual scan will contain all metering information that has been created since the last scheduled scan. During the manual scan, the metering files stored on disk will be deleted, but their content is kept in memory. After the manual scan, the agent will recreate all metering files as they were before the scan.

  • At midnight local time, the agent will finalize the metering files for the currently running processes with an end time of 23.59.59. New metering files will be created with a start time of 00.00.00 on the next day.

For an example of how application usage is calculated, see Metering example .

Metering example

In this example, the application Microsoft Word is used for three consecutive days.

Day

Action

Comment

Monday,

3 PM

The user starts one instance of MS Word.

Since the agent is running, it gets notified on this start event and starts a new metering period with Run count = 1.

Monday,

6 PM

The user leaves for home; MS Word is left open and the computer is unlocked.

MS Word is considered to be "running" all night.

At midnight, a new metering file will be created with Run count = 0.

Tuesday,

8 AM

The user continues to work with MS Word (one instance) all day.

At 09.00 a scheduled scan is performed, and all metering files are consumed and deleted. The total duration will be summed up, as will the Run counts:

1 (the metering file from Monday) + 0 (the metering file from Tuesday) = 1

After the scan, new metering files will be created for all currently running processes, with Run count = 0.

Tuesday

The user locks the computer several times during the day.

The Run count will not be affected by this, but the "duration" will be paused while the screen is locked.

Tuesday,

6 PM

The user leaves for home; MS Word is left open, but this time the computer is locked.

This will not affect the Run count.

At midnight, nothing will happen since the computer is locked.

Wednesday,

8 AM

The user unlocks the computer.

When the computer is unlocked, the agent will notice that it is a new day, and create new metering files with Run count = 0.

At 09.00 a scheduled scan is performed, and all metering files are consumed and deleted. The total duration will be summed up. Since the run count is "0" (no start events since the last scan) the scan result will be Run count = 1.

After the scan, new metering files will be created for all currently running processes, with Run count = 0.

Wednesday,

9 AM-11 AM

The user starts three additional instances of MS Word.

These three start events will all be gathered by the agent setting the Run count = 3.

Wednesday,

11 AM

The user closes all instances of MS Word. The user does not start MS Word any more that day.

The metering period ends. It has a Run count = 3, since three start events was gathered by the agent.

Thursday

The user does not use MS Word at all.

At 09.00 a scheduled scan is performed including the last metering duration from Wednesday with Run count = 3.

In this example, the total Run count for the application Microsoft Word is reported as;

1 (scan on Tuesday) + 1 (scan on Wednesday) + 3 (scan on Thursday) = 5.

Metering of web application usage

Snow Inventory Agent for Windows can meter the usage of web applications. The configuration of which web applications to meter is done in the web user interface of Snow License Manager.

To enable web application metering legacy_webmetering.is_enabled must be configured to true.

Note

From Snow Inventory Agent 6.2 for Windows, the setting idx.endpoint is deprecated. Snow Inventory Agent 6.2 for Windows will retrieve the web application patterns from the first available endpoint in the Snow Inventory Agent configuration file.

Web application patterns will be retrieved every eight hours and when the Snow Inventory Agent is started or restarted.

If new or updated patterns are available they will be downloaded by the agent and stored in the file webapps.config.

All web application patterns in the webapps.config file are monitored for usage. The usage is recorded independently of which type of application connects to the web host, i.e. a web browser or any other application.

Web applications are monitored by the explicit host names and ports that are configured for use. For example, if a user has Snow Inventory Agent for Windows installed, web application metering is enabled, and Snow Inventory Agent is configured to monitor use of www.google.com on port 80, usage of that site will be metered. If the same user is using a proxy, or some other kind of technology that redirects network traffic, so that www.google.com looks like proxy.external.example.com, and/or port 80 is redirected to port 3128, metering will not be possible.

Metering of cloud application usage

Snow Inventory Agent for Windows can report usage of cloud applications, also known as software as a service (SaaS). It reports usage of cloud applications accessed via a browser, used for example for messaging, office software, invoicing, and service desk services.

To enable SaaS application metering, the agent must be configured with at least one browser extension enabled and at least one file containing matching rules must be present in the Snow Inventory Agent folder. These files can be deployed and updated by using update tasks via Snow Inventory Server by use of its Admin Console, or they can be deployed via third-party tools.

The extensions are enabled by default. That is, the agent will try to install the corresponding browser extension if the configuration file does not contain:

  • a setting with the name saas.<browser>.enabled, and

  • the value “false“ in the SystemSettings section.

When the correct conditions are met, the file cloudmeteringhost.exe is extracted from the main executable of Snow Inventory Agent and run in the context of the active user account.

For more detailed information about how the feature works and the available browser extensions, see Cloud Application Metering for Snow Inventory.