Setting up SLM Tags logging

To enable ILMT to track compiler usage, you must set up SLM Tags logging.

About this task

If your compiler license is an authorized user license, use these steps to set up XL compiler SLM Tags logging.

Procedure

  1. Determine the user IDs of your authorized users.
  2. Create a file with the name XLAuthorizedUsers in the /etc directory. You can change the location of the XLAuthorizedUsers file by specifying the slm_auth attribute of the configuration file. The file contains the information for authorized users, one line for each user. Each line contains the numeric uid of the authorized user followed by a comma, and the Software ID (SWID) of the authorized product.

    You can obtain the uid of a user ID by using the id -u username command, where you replace username with the user ID you are looking up.

    You can find the SWID of the product by running the following command:
    grep persistentId /opt/ibm/xlC/V.R.M/swidtag/*.swidtag
    where V.R.M is the Version.Release.Modification level of the compiler that is installed on the system.

    For IBM® XL C/C++ for Linux, the SWID is 43d3e5201c664350a0cb3a4772381fe0, which does not change across compiler versions or for different installation instances.

  3. Set /etc/XLAuthorizedUsers to be readable by all users invoking the compiler:
    chmod a+r /etc/XLAuthorizedUsers

Results

If a user's uid is listed in /etc/XLAuthorizedUsers, the compiler will log an authorized user invocation along with the SWID of the compiler being used. Otherwise the compiler will log a concurrent user invocation.

Note that XL compiler SLM Tags logging does not enforce license compliance. It only logs compiler invocations so that you can use the collected data and IBM License Metric Tool to determine whether your use of the compiler is within the terms of your compiler license.

Example

Suppose that you have three authorized users whose IDs are bsmith, rsingh, and jchen. For these user IDs you enter the following commands and see the corresponding output in a command shell:
$id -u bsmith
24461
$id -u rsingh
9204
$id -u jchen
7531 
You run the following command to obtain the SWID:
$ grep persistentId /opt/ibm/xlC/13.1.5/swidtag/*.swidtag
<Meta persistentId="43d3e5201c664350a0cb3a4772381fe0"/>
Then you create /etc/XLAuthorizedUsers with the following lines to authorize these users to use the compiler:
24461,43d3e5201c664350a0cb3a4772381fe0
9204,43d3e5201c664350a0cb3a4772381fe0
7531,43d3e5201c664350a0cb3a4772381fe0 


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us