| User Opinions (6 votes) |
100%
0%
|
|
Thank you for rating this answer.
|
Article ID: 190
Last Updated: 11th September 2009 10:54:32 am
Specifying CPU cores for floating licenses can be useful in cases such as high-tech computing and application virtualization. This license model enables you to base licensing on the customer's computing resource requirements, increasing the pricing depth for your software offerings. For example, since a 4-CPU machine is double the speed of a 2-CPU machine, licensing the 4-CPU machine would be double the cost of licensing the 2-CPU machine.
To base floating licenses on CPU cores (example made in Windows environment):
- Start a new project in your IDE. Base your code on the example in LM-X root directory\examples\network\network.c.
- Include the LM-X library into your application (see the LM-X Quick Start Guide for more information).
- Generate a floating license file using xmllicgengui (for Windows only; use xmlilicgen for other platforms), located in LM-X root directory\platform-specific directory, for example, C:\LM-X\Win32_x86. The settings for the floating license are shown in the following screenshot:

An example XML template for a floating license looks like the following:
‹?xml version="1.0" encoding="utf-8"?› ‹LICENSEFILE› ‹SETTING END="2010-01-01" /› ‹FEATURE NAME="F1" /› ‹SETTING MAJOR_VERSION="1" /› ‹SETTING MINOR_VERSION="0" /› ‹SETTING COUNT="5" /› ‹SERVER_HOSTID› ‹SETTING ETHERNET="C8A516AD01AFC9FA" /› ‹/SERVER_HOSTID› ‹/FEATURE› ‹/LICENSEFILE›
- To take the number of cores into account in your code (based on network.c example), change the checkout parameter:
LMX_Checkout(LmxHandle, LMX_GetFeatureChecksum("F1"), 1, 0, 1)
For processor-based licensing that sets the count to the number of logical CPUs, change the checkout parameter to:
LMX_Checkout(LmxHandle, LMX_GetFeatureChecksum("F1"), 1, 0, LMX_LOGICAL_CPU_COUNT)
For processor-based licensing that sets the count to the number of physical CPUs, change the checkout parameter to:
LMX_Checkout(LmxHandle, LMX_GetFeatureChecksum("F1"), 1, 0, LMX_PHYSICAL_CPU_COUNT)
- Compile your application. To check how it works, remember to start the license server (refer to the LM-X Quick Start Guide for more information).
|