Step By Step on How to Use Software Metering

Software Metering is a feature in Configuration Manager that allows you to monitor and collect software usage data from Configuration Manager 2007 clients. Check the following technet document for more about Software Metering: In this article we will show you how to use Software Metering Step by Step.

Step 1. Create Metering Rules on Server

Software Metering & Software Inventory are two features that can run separately. Back end, the two features share some same Database tables, so Software Metering reports are able to leverage the file information inventoried by Software Inventory. Software Metering can also automatically generate *disabled* metering rules from the Software Inventory results. You can configure whether it should generate and how it generate these disabled rules by Software Metering -> Right click, Properties.

 To Create Metering Rules, you can either enable the auto-generated rules or create your own ones.

  • To Enable the auto-generated rule: go to Computer Manager -> Software Metering, select the rule and right click and choose “Enable”.
  • To Create your own rule, go to Computer Manager -> Right click Software Metering, select New Software Metering Rule.

Step 2. Collect Metering Data from Client

Metering is always working on client. It meters all programs running on the client. However it will only generate report for Enabled metering rules. That is, the metered files/products. After you create the metering rules on site server, clients will receive them through Policy Retrieval Cycle. All the metered data are save in WMI Classes: Root\ccm\SoftwareMeteringAgent. You can check it by running WMI Query or use PolicySpy.

Client will report metering results on a scheduled basis (The schedule can be configured by Site Settings -> Client Agent -> Software Metering Agent -> Schedule Tab) or when you initial the “Software Metering Usage Report Cycle” from the control panel -> Configuration Manager client applet. After usage report cycle is triggered, you can check log SWMTRReportGen.log to see whether there’re data reported:

  • If no data need to be sent (It can either because no metering rules or because no metered programs have been run), it will show: No usage data found to generate software metering report
  •  If there’re data need to be sent, it will show: Successfully generated report header......CSWMtrReportEndpoint- Message ID of sent message: {38FF78FF-7CE0-4CA5-B4E7-6824F796BE13}......

 Step 3. Metering Data processed on Site Server.

 After client has sent report, you can go to the site server and check log swmproc.log, it will show how many records have been added:

  • Processed 1 XML files and 0 VAR files.    SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 7:47:37 PM    44332 (0xAD2C)
  • Disposition: 1 ok, 0 retry, 0 corrupt.         SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 7:47:37 PM    44332 (0xAD2C)
  • 3 records added to database.     SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 7:47:37 PM    44332 (0xAD2C)

However there records are discrete and cannot be used in reporting or be sent to parent site. The site need to summarize them first. There’re two tasks “Summarize Software Metering File Usage Data” & “Summarize Software Metering Monthly Usage Data” will do the summarize work. You can set the schedule of these two tasks from Site Settings -> Site Maintenance -> Tasks. You can use the utility tool runmetersumm.exe to generate the summarize data. Only after the summarize data is generated, you can have data in Software Metering related reports.

Note: runmetersumm.exe must be run on the SQL Server machine and it must been run under the SMS\bin\i386 folder. If you are using a remote SQL Server, you can copy the runmetersumm.exe to the site server SMS\bin\i386 folder and run \\<site server>\..\SMS\bin\i386\runmetersumm.exe <parameters> on the SQL Server.

Step 4. Software Metering Data replication among sites

And on a scheduled basis (once every hour), Metering Process will get all the unprocessed summarized data and export them into file and send to parent. You can trigger it by restart the Software Metering Processor.

You will see the following in swmproc.log on the child site server:

  • It's been 24 hours since the last replication, attempting replication of summary data to site WEB.                SMS_SOFTWARE_METERING_PROCESSOR          4/26/2011 8:47:07 PM    38640 (0x96F0)
  • New usage processing thread started, current usage processing thread count: 1                SMS_SOFTWARE_METERING_PROCESSOR          4/26/2011 8:47:07 PM    4452 (0x1164)
  • Exported 67 summary records.  SMS_SOFTWARE_METERING_PROCESSOR          4/26/2011 8:47:08 PM    38640 (0x96F0)

And correspondingly, you’ll see followings in swmproc.log on the parent site server:

  • Checking for incoming summary data.    SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 8:04:17 PM    51696 (0xC9F0)
  • Processing incoming summary data.        SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 8:04:17 PM    51696 (0xC9F0)
  • Processing metering summary file 'in3q1thu.SUM'           SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 8:04:17 PM         51696 (0xC9F0)
  • Imported 99 summary records   SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 8:04:18 PM    51696 (0xC9F0)
  • Summary import successful.       SMS_SOFTWARE_METERING_PROCESSOR          4/28/2011 8:04:18 PM    51696 (0xC9F0)