# FlexNet Embedded license client setup

# FlexNet Embedded license client setup

#### Subtopics

1. [Installing the FNE license client](https://lhc.advantest.com/books/flexnet-embedded-licensing/page/installing-the-fne-license-client "Installing a FlexNet Embedded license client used to provide the activated licenses to a SmarTest installation on a system controller workstation requires two steps: the installation of the license client software itself on the SmarTest host system, and configuration of the license server configuration file to prioritized the order of server access.")
2. [Uninstalling the FNE license client](https://lhc.advantest.com/books/flexnet-embedded-licensing/page/uninstalling-the-fne-license-client "Uninstalling the FNE license client is done manually using yum.")
3. [Enabling license logging](https://lhc.advantest.com/books/flexnet-embedded-licensing/page/enabling-license-logging "Detailed information about license consumption and optimize license usage can be identified by License usage logging.")

The FlexNet Embedded license client is required to run on the system controller (installed as default).

The FlexNet Embedded license client is installed as the default license client.

Information required to install, configure and administer FlexNet Embedded license clients is divided into the following areas:

- <span style="text-decoration: underline;">License client installation</span> - Installation of the license client software to manage the licensing of a SmarTest software installation.
- <span style="text-decoration: underline;">Switching the client </span>between FlexNet Embedded and FlexNet Publisher servers.
- <span style="text-decoration: underline;">License client administration</span> - Advantest FlexNet Embedded (FNE) license client tools and their usage.

<section class="section" id="bkmrk-system-controller-pr">### **System controller prerequisites**

- SmarTest 8.x
- The system controller fully-qualified hostname

</section><section class="section" id="bkmrk-checking-the-connect">### **Checking the connection to a customer-hosted FNE License Server**

After installing the FNE license server, check that the FNE license server is contactable from the SmarTest workstation before you start the installation of the FNE client subsystem on the SmarTest workstation.

<kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput">h<kbd class="userinput">ref="http://<fne-server-hostname>:7070/api/1.0/health <kbd class="userinput"><fne-server-hostname></kbd></kbd></kbd>`</span></kbd></kbd>

Complete the following procedure to check the connection to the FNE license server:

1. Open a browser.
2. Enter the URL appropriate for your FNE server arrangement: 
    - <kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><strong>h<kbd class="userinput">ref="http://<fne-server-hostname>:7070/api/1.0/health </kbd></strong></kbd></kbd></kbd></kbd>`</span></kbd></kbd><kbd class="userinput"><kbd class="userinput"><span class="keyword">  
        `<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><strong><kbd class="userinput"><kbd class="userinput"><fne-server-hostname></kbd></kbd></strong></kbd></kbd></kbd></kbd>`</span></kbd></kbd>represents the hostname of the *FNE license server* to which you are testing the connection.
    - **<kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput">h<kbd class="userinput">ref="http://<failover-fne-server-hostname>:7070/api/1.0/health <br></br><kbd class="userinput"><failover-fne-server-hostname></kbd></kbd></kbd>` </span></kbd></kbd>**represents the hostname of the *failover FNE* license server to which you are testing the connection.
    
    If the FNE license server is contactable (port 7070 is open), the following type of output is displayed:
    
    [![11.png](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/L4R11-png.png)](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/L4R11-png.png)
3. **If port 7070 is not open**, you a page with a not available message is displayed. In this case, get in contact with your administrators (customer IT) and request that port 7070 is opened for the SmarTest client workstation.

</section><section class="section" id="bkmrk-checking-the-connect-2"></section><section class="section" id="bkmrk-next-steps-if-the-pr"></section>

# Installing the FNE license client

<kbd class="userinput"></kbd>Installing a FlexNet Embedded license client used to provide the activated licenses to a SmarTest installation on a system controller workstation requires two steps: the installation of the license client software itself on the SmarTest host system, and configuration of the license server configuration file to prioritized the order of server access.

<main id="bkmrk-about-this-task-inst" role="main"><article aria-labelledby="ariaid-title1" role="article"><div><section class="section">### About this task

Installing the FNE license client (installed as default license client) also installs the FNE Server Viewer. For more details, see [Monitoring license servers using the FNE Server Viewer](https://lhc.advantest.com/books/flexnet-embedded-licensing/page/monitoring-license-servers-using-the-fne-server-viewer "The FNE Server Viewer is a web-based application that can be used to monitor Advantest license servers.").

The following procedure explains how to install the FlexNet client.

</section><section>### **Before you begin**

The license client is the SmarTest software. The FlexNet license server communicates with SmarTest using the FNE client.

The license client install package can be downloaded from the FNE section of the Advantest Software Center:

[https://softwarecenter.advantest.com/download/othersw/builds/licensing](https://softwarecenter.advantest.com/download/othersw/builds/licensing)

The following procedure is applicable to installation, upgrades and updates.

</section></div></article></main><p class="callout info">Note: During upgrading and updating, the installation script can be called without any option. All installed packages are detected automatically and updated if applicable.  
<kbd class="userinput"> <kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput">sudo sh install-fne-<var class="varname">date</var>-<var class="varname">version</var>.sh</kbd></kbd>`</span></kbd></kbd></p>

<main id="bkmrk-port-7070-must-be-op" role="main"><article aria-labelledby="ariaid-title1" role="article"><div><section>**Port 7070** must be open to the customer FNE license server and if needed to the cloud license server.

To check connection to your license servers, use the command:

If you are using the Advantest cloud license servers, check the connections by opening the following URLs:

- <kbd class="userinput"><span style="text-decoration: underline;">http://&lt;license-server&gt;:7070/ping</span>  
      
    </kbd>
- <kbd class="userinput"><span style="text-decoration: underline;">https://&lt;Device Owner FNE license server&gt;.advantest.cloud:7070/ping</span>  
      
    </kbd>
- <span style="text-decoration: underline;"><kbd class="userinput">https://&lt;Device Owner FNE license server&gt;-fo.advantest.cloud:7070/ping</kbd></span>

If port 7070 is open, the following type of output is displayed:

[![44.png](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/jtO44-png.png)](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/jtO44-png.png)  
</section><section>### **Procedure**

1. Open the Advantest Software Center in a browser: [https://softwarecenter.advantest.com/](https://softwarecenter.advantest.com/)  
      
    Login with your credentials.
2. To get the list of all available Licensing products, from the left menu select: **<span class="menucascade"><span class="uicontrol">Other</span><abbr title="and then"> &gt; </abbr><span class="uicontrol">Licensing  
      
    </span></span>**[![55.png](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/9IE55-png.png)](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/9IE55-png.png)
3. Scroll to and select the license type FNE and the version you want to install and expand to display the details.
4. <span id="bkmrk-create-an-empty-inst">Create an empty installation directory. For example:<kbd class="userinput"> <kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput">/tmp/smartest_pakages</kbd></kbd></kbd>`</span></kbd></kbd>  
      
    </kbd></span>
5. Download the archive package by clicking the [![9.png](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/WoC9-png.png)](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/WoC9-png.png) icon.   
    The selected license (<span class="filepath"><span id="bkmrk-tar.gz"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput">tar.gz</kbd></kbd></kbd>`</span></kbd></kbd></kbd></span></span>) package is downloaded to your browser's download folder.
    
    Example FNE packages include:
    
    <span class="filepath"><span id="bkmrk-fne_2024.01.0.0-2404"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput">fne_2024.01.0.0-24043_rhel9.tar.gz</kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span></span>
6. Move the downloaded archive packages to the installation directory: <span id="bkmrk-%2Ftmp%2Fsmartest_pakage"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput">/tmp/smartest_pakages</kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span>
7. Unpack the archive with the command:  
    <span id="bkmrk-tar-xvzf-package-nam"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">tar xvzf <var class="varname">package-name</var>.tar.gz</kbd></kbd></kbd></kbd>`</span></kbd></kbd></kbd></span>  
    For example:  
    **<span id="bkmrk-tar-xvzf-fne_2024.01"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">tar xvzf <kbd class="userinput">fne_2024.01.0.0-24043_rhel9.tar.gz</kbd></kbd></kbd></kbd></kbd>`</span></kbd></kbd></kbd></span>**
    
    <div>  
    </div>**The installation script is extracted**, for example:
    
    <span class="filepath">**<span id="bkmrk-install-fne-2024.01."><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">install-fne-2024.01.0.0-24043-rhel9.sh</kbd></kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span>**</span>
8. Check the downloaded archive package for integrity:  
      
    <kbd class="userinput"><span id="bkmrk-bash-install-fne-dat"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">bash install-fne-<var class="varname">date</var>-<var class="varname">version</var>.sh test</kbd></kbd></kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span></kbd>
9. Shut down the **SmarTest Work Center**.  
    For details see [Shutting down SmarTest](https://tdc.advantest.com/help/topic/com.verigy.itee.help.smartest.ui.8.7.6/248729.htm "This task describes the procedure of shutting down SmarTest.").
10. Install the client package: <kbd class="userinput"><kbd class="userinput"><span id="bkmrk-sudo-sh-install-fne-"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">sudo sh install-fne-<var class="varname">date</var>-<var class="varname">version</var>.sh client</kbd></kbd></kbd></kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span></kbd></kbd>
    
    For example:  
    <kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span id="bkmrk-sudo-sh-install-fne--1"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">sudo sh install-fne-2024.01.0.0-24043-rhel9.sh client</kbd></kbd></kbd></kbd></kbd></kbd></kbd>`  
    </span></kbd></kbd></kbd></span></kbd></kbd></kbd>
    
    <p class="callout info"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span id="bkmrk-note%3A-during-upgradi"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">Note: During upgrading and updating, the installation script can be called without any option. All installed packages are detected automatically and updated if applicable.  
    </span></kbd></kbd></kbd></span></kbd></kbd></kbd></p>
    
    <div><div class="note">  
    </div></div>
11. **Optional:**  <span id="bkmrk-remove-the-installat">Remove the installation directory. For example:  
      
    </span><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span id="bkmrk-rm--rf-%2Ftmp%2Fsmartest"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">rm -rf /tmp/smartest_packages</kbd> </kbd></kbd></kbd></kbd></kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span></kbd></kbd></kbd></kbd>
12. After the installation has completed, configure the license server configuration file where the list of FlexNet Embedded license servers are listed in a prioritized order.  
      
    Open the **configuration file** in an editor: **<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span id="bkmrk-%2Fetc%2Ffne%2Fclient.conf"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">/etc/fne/client.conf</kbd></kbd></kbd></kbd></kbd></kbd></kbd></kbd></kbd>`  
      
    </span></kbd></kbd></kbd></span></kbd></kbd></kbd></kbd></kbd>**
    
    Syntax of the **<kbd class="userinput">client.conf</kbd>** file:
    
    <div>
    - **Local license server**
        
         ```
        #Configuration of FNE servers to be used
        # primary FNE server
        server
        {
        name = "FNE on localhost"
        url = "localhost"
        }
        ```
    - **Remote license server**
        
        ```
        #Configuration of FNE servers to be used
        # primary FNE server
        server
        {
        name = "FNE central server"
        url = "hostNameLicenseServer.domain"
        }
        #secondary FNE server
        server
        {
        name = "FNE remote server"
        url = "socbu158.advantest.com"
        }
        ```
    
    ---
    
    <div class="p">Keywords for the **<kbd class="userinput">client.conf</kbd>** file:  
      
    <dl><dt class="dlterm"><span style="color: rgb(126, 140, 141);">**include**</span></dt><dd>Used to include another configuration file. <kbd class="userinput">**include**</kbd> can be used multiple times in a file.
    
    </dd><dt class="dlterm"><span style="color: rgb(126, 140, 141);">**server { }**</span></dt><dd>Used to specify a server description with brackets enclosing each description. <kbd class="userinput">**server { }**</kbd> can be used multiple times in a file.
    
    </dd><dt class="dlterm"><span style="color: rgb(126, 140, 141);">**name**</span></dt><dd>Free text used to add a description for a server.  
      
    </dd><dt class="dlterm"><span style="color: rgb(126, 140, 141);">**selector**</span></dt><dd>The client must comply with all listed selector conditions before the client can attempt to contact the server.  
    <kbd class="userinput">**selector**</kbd> can be used multiple times in a file.
    
    </dd><dt class="dlterm">**<span style="color: rgb(126, 140, 141);">url/primaryUrl</span>**</dt><dd>**<kbd class="userinput">url</kbd>** used to address for the server if only one server is configured. Use **<kbd class="userinput">primaryUrl</kbd>** instead for the primary server when more than one server is configured.  
      
    </dd><dt class="dlterm"><span style="color: rgb(126, 140, 141);">**failoverUrl**</span></dt><dd>Used to address the failover servers.  
      
    </dd><dt class="dlterm"><span style="color: rgb(126, 140, 141);">**mute**</span></dt><dd>Used to suppresses connection-related error messages for the corresponding server.
    
    Other error messages are displayed.
    
    Some FNE servers listed in **<span class="filepath">client.conf</span>** files may be unavailable by intent, for example, emergency servers or temporary servers. If these servers are not running or disconnected, associated error messages are normally displayed at each checkout request, which can be unhelpful if it is an expected situation.
    
    </dd></dl></div></div><p class="callout info"><span class="title">Note:</span> The <span class="keyword">mute</span> keyword is not supported by older FNE subsystems and is ignored if specified. For FNE subsystem versions that do not support the <span class="keyword">mute</span> keyword, a syntax warning might be displayed and can be ignored.</p>
    
    <div><div class="p"><dl><dd><div class="note">  
    </div></dd></dl></div></div>
13. Enter the names and URLs for all FlexNet Embedded license servers that you want to use in their order of priority.
14. To verify the installation and license server configuration enter the command:  
    <kbd class="userinput"><span id="bkmrk-%2Fusr%2Flocal%2Fbin%2Ffne-l"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><strong>/usr/local/bin/fne-list-licenses</strong></kbd></kbd></kbd></kbd></kbd></kbd>`</span></kbd></kbd></kbd></span></kbd>  
    The tool iterates through the FlexNet Embedded servers defined in <kbd class="userinput"><span id="bkmrk-%2Fetc%2Ffne%2Fclient.conf-1"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">**`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">/<span class="filepath">etc/fne/client.conf</span></kbd></kbd></kbd></kbd></kbd></kbd>`** </span></kbd></kbd></kbd></span></kbd>and lists all licenses (used and available).
    
    It also provides detailed information about the available licenses including:
    
    <div>
    - Content of the AssetScale tokens
    - Locking of licenses
    - Expiry information
    
    </div><p class="callout info"><span class="title">Note:</span> The <kbd class="userinput">fne-list-licenses</kbd> tool does not show details from cloud license servers.  
    </p>
    
      
    For details, see [fne-list-licenses](https://lhc.advantest.com/books/flexnet-embedded-licensing/page/advantest-flexnet-embedded-license-client-tools).

</section><section class="section">### **Results**

You have installed the license client software and configured the list of FlexNet Embedded license servers in a prioritized order.

The order in which clients attempt to check out licenses is the same order in which the licenses are referenced in the **<span class="filepath">client.conf</span>** file.

</section></div>### **Example**

<div><section>#### Example of a client.conf file:

<div>  
</div> ```
#Configuration of FNE servers to be used
# Emergency Server
include "/etc/fne/emergency.conf"
server
{
    name = "Local cloud space"
    url = "localcloud.company.com"
}
server
{
   name = "My cloud"
   selector = "DeviceOwner:MyCompany"
   url = "https://MyCompany.advantest.cloud:7070"
}
server
{
    name = "Local license server"
    primaryUrl = "fne1.company.com"
    failoverUrl = "fne2.company.com"
}
```

Minimum client.conf file configuration:

```
server
{
url = "localhost"
}
```

  
</section></div></article></main><footer id="bkmrk-" role="contentinfo"><div class="fo"><div class="-share"><div class="-sharem">  
</div><div class="-shared" style="display: none;">  
</div></div></div></footer>

# Uninstalling the FNE license client

Uninstalling the FNE license client is done manually using yum.

<section class="section" id="bkmrk-about-this-task-ther">### About this task

There are two options for uninstalling the FNE license client:

- Remove the FNE client only, which results in automatically switching back to using the FNP license client and FNP licensing.
- Completely remove the FNE client installation, which removes the license client, the FNE Server Viewer, and the <kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput">test_license_checkout</kbd></kbd></kbd>`</span></kbd></kbd> tool.

</section><section class="sectiontitlefake" id="bkmrk-procedures">### **Procedures**

</section><section class="section" id="bkmrk-uninstalling-the-fne-1">#### Uninstalling the FNE license client only

To remove the FNE client only, enter the command:

<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">yum remove v93000-fne-client</kbd></kbd></kbd></kbd>`</span></kbd></kbd></kbd>

</section><section class="section" id="bkmrk-completely-uninstall">### **Completely uninstalling the FNE license client and tools**

To completely remove the FNE client installation, enter the command:

<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">yum remove <kbd class="userinput">v93000-fne-client advantest-fne-server-viewer advantest-test_license_checkout</kbd></kbd></kbd></kbd></kbd>`</span></kbd></kbd></kbd></kbd>

</section><section class="section" id="bkmrk-results%C2%A0-fne-license">### **Results** 

FNE license client is no longer installed on the SmarTest system controller.

</section><kbd class="userinput"><kbd class="userinput"><span class="keyword">  
</span></kbd></kbd>

# Enabling license logging

##### **Subtopics**

- [**Reading log file data**](https://lhc.advantest.com/link/73#bkmrk-reading-log-file-dat-1)
- [**Example logfile parser**](https://lhc.advantest.com/link/73#bkmrk-example-logfile-pars)

Detailed information about license consumption and optimize license usage can be identified by License usage logging.

### **About this task**

To be able to get detailed information about license consumption and optimize license usage, it is necessary to analyze the licensing requirements for memory and speed for each measurement within a test program. From this information, it is then possible to isolate the main license requirements.

License usage logging (incremental over measurements and per measurement logging) provides the information required to establish the licensing dependencies. If the watermark increases in proportion to the measurement data, the test is independent, otherwise it shares data with other tests.

Log data is written to:

<span class="filepath"><kbd class="userinput"><span class="keyword">`/opt/hp93000/soc/system/log/licenseUsage_<sessionId>.log `</span></kbd></span>

To read in the data you need to generate a parser based on protobuf library using the grammar in:

<span class="filepath"><kbd class="userinput"><span class="keyword">`/opt/hp93000/soc/system/include/xoc/profiling/licenseUsage.proto `</span></kbd></span>

An existing file is not overwritten - only new data is appended to the existing content.

The most valuable data collected by license logging is when you have not previously executed an initial bind before executing the profile configuration. After an initial bind, only dynamic changes are recorded.

### **Before you begin**

<section id="bkmrk-make-sure-the-test-p">Make sure the test program has been loaded.

License logging can only be enabled using a Profile launch configuration.

</section>### **Procedure**  


<section id="bkmrk-select-a-test-progra">1. Select a test program or test flow in the **<span class="uicontrol">Package Explorer</span>** view for which you want to enable license logging.
    
    License logging is not available for encrypted testflows or test programs containing encrypted testflows.
2. Open the **<span class="wintitle">Profile Configurations</span>** dialog from the context menu:
    
    <div>**<span class="menucascade"><span class="uicontrol">Profile As</span><abbr title="and then"> &gt; </abbr><span class="uicontrol">Profile Configurations  
      
    </span></span>**</div>
3. Select **<span class="uicontrol">Test Program</span>** from the objects pane on the left.
4. Click the New Launch Configuration [![10.png](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/10-png.png)](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/10-png.png) button.
5. Enter a name for the new profile configuration in the configuration pane on the right.
6. In the **<kbd class="userinput">Main</kbd>** tab (default selection), select **<span class="uicontrol">Enable license logging</span>**.  
    [![66.png](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/kAy66-png.png)](https://lhc.advantest.com/uploads/images/gallery/2025-10/scaled-1680-/kAy66-png.png)
7. Specify any other required configurations. For details, see [Creating a run configuration for running test programs or testflows](https://tdc.advantest.com/help/topic/com.verigy.itee.help.smartest.ui.8.7.6/256920.htm "You can specify, save and reuse customized configurations for starting test programs or testflows in execute or debug mode.").
8. Click **<span class="uicontrol">Apply</span>** to save the profile configuration.
9. Click **<span class="uicontrol">Profile</span>** to profile the test flow or **<span class="uicontrol">Close</span>** to close the **<span class="wintitle">Profile Configurations</span>** dialog box.

</section>##### **Results**

License logging is enabled.

Log data is written to <span class="filepath"><kbd class="userinput"><span class="keyword">`/opt/hp93000/soc/system/log/licenseUsage_<sessionId>.log.`  
</span></kbd></span>  
A license usage log file contains the memory contribution (in Bytes) for each signal for each measurement.

<p class="callout info"><span class="title">Note: License logging can also be enabled and disabled using the Test Cell API. For example:  
<span class="filepath"><kbd class="userinput"><span class="keyword">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">TestProgramConfig config;</kbd></kbd></kbd></kbd>`  
<kbd class="userinput">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">config.enableLicenseLogging = true;</kbd></kbd></kbd></kbd></kbd></kbd></kbd></kbd></kbd>`</kbd>  
<kbd class="userinput">`<kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput"><kbd class="userinput">testProgram.loadWithConfig(config);</kbd></kbd></kbd></kbd></kbd></kbd></kbd></kbd>`</kbd></span></kbd></span>  
For details about <var class="varname">TestProgramConfig</var>, see **[TestProgramConfig](https://tdc.advantest.com/help/topic/com.verigy.itee.help.smartest.ui.8.7.6/structxoc_1_1tcapi_1_1_test_program_config.html).**  
</span></p>

##### **What to do next**

<section class="section" id="bkmrk-the-generated-log-fi">The generated log file is user-readable and it is possible to manually extract the licensing requirements for memory and speed for each measurement within a test program. It is not essential to parse this file.

However, for further processing, it can be beneficial to parse the file to arrange its content into a more readable format.

To read in the data you can generate a parser based on the **<span class="keyword">protobuf</span>** library using the grammar in:

<span class="filepath"><span class="title"><kbd class="userinput"><span class="keyword">`/opt/hp93000/soc/system/include/xoc/profiling/licenseUsage.proto`</span></kbd></span></span>

---

# Reading log file data

<sup>1)</sup> Log file data contains information, such as memory usage.

##### **About this task**

<section class="section">If license logging is enabled, the license log data is written to:  
**<span class="filepath"><span class="title"><kbd class="userinput"><span class="keyword">`/opt/hp93000/soc/system/log/licenseUsage_<sessionId>.log.`</span></kbd></span></span>**

The following log example shows the used memory (Pattern or PA = 1032 bytes) for the signal D04. The total accumulated value (`accDoubleValue`) is 3096 bytes which the total memory used by the complete program.

##### <span style="text-decoration: underline;">**LicenseUsage.log file example:**</span>

```
measurementName: "Main.GlobalPAPattern.measurement"
measurementTimestamp: "Mon, 01 Jul 2019 15:30:08 -0700"
licensedFeatureLog {
featurePerSignal {
signalList: "D00 + D01 + D02 + D03 + D04"
feature {
feature: "speed"
accDoubleValue: 10000000
unit: "bps"
}
}
featurePerSignal {
signalList: "D04"
feature {
feature: "memory"
accDoubleValue: 3096
doubleValue: 1032
unit: "B"
}
feature {
feature: "sharedMemory"
doubleValue: 60352
unit: "B"
}
}
}

```

<div class="p"><div>  
</div></div>A license usage log file contains the memory contribution (in Bytes) for each signal for each measurement. The accumulated memory value is also recorded. In the example above:

<div class="p"><table border="1" class="frame-all" style="border-collapse: collapse; border-width: 0.2px; width: 92.1429%; height: 244.984px;"><tbody><tr style="height: 30.1094px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">**<span class="uicontrol">Measurement</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">Main.GlobalPAPattern.measurement</td></tr><tr style="height: 30.1094px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">**<span class="uicontrol">Signal names</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">signal\_list: "D00 + D01 + D02 + D03 + D04"</td></tr><tr style="height: 64.3281px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 64.3281px;">**<span class="uicontrol">Signal requirement type</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 64.3281px;">feature: speed (all signals)

feature: memory (signal D04)

feature: sharedMemory (signal D04)

</td></tr><tr style="height: 30.1094px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">**<span class="uicontrol">Accumulated speed value</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">accDoubleValue: 10000000 bps (all signals)</td></tr><tr style="height: 30.1094px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">**<span class="uicontrol">Accumulated memory value</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">acc\_double\_value: 3096 B (signal D04)</td></tr><tr style="height: 30.1094px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">**<span class="uicontrol">Memory value</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">doubleValue: 1032 B (signal D04)</td></tr><tr style="height: 30.1094px;"><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">**<span class="uicontrol">Shared memory value</span>**</td><td class="colsep-1 rowsep-1" style="border-width: 0.2px; height: 30.1094px;">doubleValue: 60352 B (signal D04)</td></tr></tbody></table>

</div>This file is in the **protobuf** (ASCII) format and can be read using a simple parser. For more information, refer to: https://developers.google.com/protocol-buffers/</section></section><p class="callout info"><span class="title">Note:</span> If you only require the values for a specific measurement, you can read this from the ASCII text manually.</p>

```
TestProgramConfig config;
config.enableLicenseLogging = true;
testProgram.loadWithConfig(config);

```

<section class="section" id="bkmrk-the-protocol-buffer-"><section class="section">The protocol buffer compiler is installed under <kbd class="userinput">`<span class="filepath">/usr/bin/protoc</span>`</kbd>The protoc version can be found with the command:<kbd class="userinput">`/usr/bin/protoc --version`</kbd>

Output example: **<span class="filepath">libprotoc 2.5.0</span>**

To structure information, protocol buffer message types are defined in .proto files. The following protobuf file is used for license logging, which can be compiled with the protocol buffer compiler to Java, Python, Objective-C, or C++.

<dl></dl>---

<dl><dd>### **Before you begin**

</dd></dl></section></section><section class="section" id="bkmrk-make-sure-that-licen"><dl><dd><span style="color: rgb(68, 68, 68);">Make sure that license logging is enabled. For details, see </span>[Enabling license logging](https://lhc.advantest.com/books/flexnet-embedded-licensing/page/enabling-license-logging "Detailed information about license consumption and optimize license usage can be identified by License usage logging.")<span style="color: rgb(68, 68, 68);">.</span></dd></dl></section><section class="section" id="bkmrk-procedure-create-a-p">### **Procedure**  


<section>1. Create a parser file, for an example, see [Example logfile parser](https://lhc.advantest.com/link/73#bkmrk-example-logfile-pars)**.**
2. For example, to compile to C++ with the protocol buffer compiler, run the following commands or a **<span class="filepath">make.sh</span>** script containing the commands:  
    <span class="filepath"><kbd class="userinput">`protoc -I=/opt/hp93000/soc/system/include/xoc/profiling/ --cpp_out=.`</kbd></span>
    
    <span class="filepath"><kbd class="userinput">` /opt/hp93000/soc/system/include/xoc/ profiling/licenseUsage.proto`</kbd></span>  
    <span class="filepath"><kbd class="userinput">`c++ -std=c++11 -g -L/usr/local/lib -lprotobuf -o licenseLogger licenseUsage.pb.cc main.cpp`  
      
    </kbd></span>
    
    The generated C++ class is used to simplify the parser implementation.
    
    ```
    ./licenseLogger licenseUsage.log memory D04
    Analysing: licenseUsage.log memory D04
    Top 20 measurement runs for feature "memory" at signal "D04"
    Measurement Run                   | Value    |Watermark Value
    ----------------------------------+----------+-----------------------
    Main.GlobalPAPattern2.measurement | 1032.000 | 3096.000
    
    ```

</section>### **Results**

<section class="section">After the above **<kbd class="userinput">protoc</kbd>** call or **<kbd class="userinput">make.sh</kbd>** script is run, the following files are created:

<dl><dt class="dlterm">**<span style="color: rgb(126, 140, 141);">licenseLogger</span>**</dt><dd> Generated Parser Executable To execute the licenseLogger, use the command: <kbd class="userinput"><span class="filepath"><kbd class="userinput"> `./licenseLogger <output_file_name> <license_type> <signal>`</kbd></span></kbd>

 For example:

<kbd class="userinput"><kbd class="userinput"><span class="filepath"><kbd class="userinput"> `./licenseLogger <kbd class="userinput">licenseUsage.log memory D01`</kbd></span></kbd></kbd>

</dd><dt class="dlterm">**<span style="color: rgb(126, 140, 141);">measurementLicense.pb.cc</span>**</dt><dd> Generated after running protobuf compiler  
  
</dd><dt class="dlterm">**<span style="color: rgb(126, 140, 141);">measurementLicense.pb.h</span>**</dt><dd> Generated after running protobuf compiler</dd></dl></section></section>---

## Example logfile parser

<sup>1)</sup> The following code is an example parser for reading license log files and printing the top 10 measurement executions contributing to the specified feature and signal.

#### **Example parser (SmarTest ≥ 8.2.0)**

```
#include <iostream>
#include <fcntl.h>
#include <fstream>
#include <google/protobuf/text_format.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <map>
#include <iostream>
#include <iomanip>
#include <sstream>
#include "licenseUsage.pb.h"
 
using namespace std;
using namespace license;
using namespace ::google::protobuf::io;
using ::google::protobuf::TextFormat;
 
map<double,string> featureValuePerMeasurement;
map<string,double> featureValuePerMeasurementWatermark;
 
//  measurementName, <license string, count>
multimap<string, pair<string,int> > licenseUsage;
 
// utility to extract signal from signal list into a vector of signals
vector<string> signalsToVector(string& signals)
{
 vector<string> items;
     const char* t = " \t\n\r\f\v";
     unsigned long opos = 0;
     unsigned long pos = signals.find_first_of(" + ");
     while (true) {
 
          // trim white spaces
          string extract = signals.substr(opos, pos - opos);
          extract.erase(0, extract.find_first_not_of(t));
          extract.erase(extract.find_last_not_of(t) + 1);
 
          items.push_back(extract);
          if (string::npos == pos) { break; }
          pos = signals.find_first_of(" + ", opos = pos + 1);
     }
 
 return items;
}
 
// Sample method to print Top 20 measurement runs for given feature and signal
// In addition print the license usage after the Top1 measurement was executed.
void printTop20(string& featureKey, string& sigKey)
{
 int x = 0;
     int mrlen = 0;
     for(auto elem = featureValuePerMeasurement.rbegin();elem != featureValuePerMeasurement.rend() && x < 20; ++elem, ++x) {
      if(elem->second.size() > mrlen) { mrlen = elem->second.size();  }
     }
 
     cout << "Top 20 measurement runs for feature \"" << featureKey << "\" at signal \"" << sigKey << "\"" << endl << endl;
     cout << setw(mrlen) << left << "Measurement Run" << " |  Value       | Watermark Value " << endl;
     for(int i=0;i<mrlen;++i) { cout << "-"; }
     cout << "-+--------------+-----------------------" << endl;
     x=0;
     for(auto elem = featureValuePerMeasurement.rbegin();elem != featureValuePerMeasurement.rend() && x < 20; ++elem, ++x) {
     cout << fixed << setw(mrlen) << elem->second << " | " << setw(12) << left << setprecision(3) << elem->first << " | " << setprecision(3) << featureValuePerMeasurementWatermark[elem->second] << endl;
     }
            
     cout << endl << endl;
     string mrName = featureValuePerMeasurement.rbegin()->second;
     auto elements = licenseUsage.equal_range(mrName);
     auto elem = elements.first;
     for(;elem != elements.second; ++elem) {
     cout << "Count: "<< setw(6) << elem->second.second <<elem->second.first << endl;
     }
 
}
            
bool processMessage(string& message, string featureKey, string sigKey)
{
     license::MeasurementLicense log;
 
     if (!TextFormat::ParseFromString(message, &log)) {
          cerr << endl << "Failed to parse string: " << endl;
          return false;
     }
            
     string mrName = log.measurementname();
     LicensedFeatureLog feature = log.licensedfeaturelog();
     for(int i=0; i<feature.featurepersignal_size();++i) {
          FeaturePerSignal fps = feature.featurepersignal(i);
          string signals = fps.signallist();
          vector<string> signalVector = signalsToVector(signals);
          for(int x=0;x<fps.feature_size();++x) {
           Feature f = fps.feature(x);
           if(f.feature() == featureKey) {
            for(auto const & sig : signalVector) {
             if(sig == sigKey) {
              featureValuePerMeasurementWatermark[mrName] = f.accdoublevalue();
              featureValuePerMeasurement[f.doublevalue()] = mrName;
             } 
            }
           }
      }
 }
 
     for(int i=0;i<log.licenses_size();++i) {
     auto l = log.licenses(i);
     for(int x=0; x<l.licensestring_size();++x) {
          auto ls = l.licensestring(x);
          licenseUsage.insert(make_pair(mrName,make_pair(ls.name(), ls.count())));
     }
}
 
 return true;
}            
 
int main(int argc, char** argv)
{
     if (argc != 4) {
          printf("wrong arguments, ussage: licenseLogger featureKey sigKey\n");
          exit (1);
     }
            
     ifstream file(argv[1]);
     string featureKey = string(argv[2]);
     string sigKey = string(argv[3]);
     string str, message;
 
     printf("Analysing: %s %s %s\n", argv[1], argv[2], argv[3]);
 
     getline(file, message);
 
     while (getline(file, str)) {
          if(str.size() > 16 && str.substr(0,16).compare("measurementName:") == 0) {
       if(!processMessage(message, featureKey, sigKey)) { exit(-1); }
       message = str;
       continue;
          }
          message += str;
     }
            
     printTop20(featureKey, sigKey);
}
                        

```