[INTERNAL] How to investigate license server usage using license server Endpoints
This Help Article only applies to the Flexnet License Server package which was used for ENVI/IDL versions 5.4 to 5.6 but has been discontinued as of June 2023.
License server endpoints can be used to retrieve server status information, such as license features available in the server, clients currently running a license, usage of a specific license feature.
These endpoints use a REST-style interface and JSON messages with REST API calls.
The license server endpoints can be directly accessed by using HTTP utilities such as CURL or browser plugins.
Depending on the browser, the response message can be directly written in the browser page or stored in a json file.
Here some examples of license server details which can be directly retrieved from the license server or from a client machine. Each command can be used in a web browser. Note that “localhost” needs to be replaced by the license server IP if the command is run from a client machine.
Listing all client machines currently checking out a license:
Enter the following command in a web browser:
http://localhost:7070/api/1.0/clients
This command will output a list of all clients currently using a license.
Each client is identified with an ID. For each ID (i.e. client machine), a list of information is provided. The field called “hostidValue” located in the first block of information for each client ID (highlighted in red below) allows identifying the client machine, as the 12 first characters of the returned value corresponds to the MAC address of the client machine which is using the license.
Here an example of output, with 2 client machines currently checking out licenses from the server. The first one is the same machine where the server is installed, the second one is a remote client machine.
[ {
"id" : 7749,
"servedStatus" : "NORMAL",
"requestHostid" : {
"hostidValue" : "A44CC82AA4DF5B3DBD32",
"hostidType" : "STRING"
},
"machineType" : "UNKNOWN",
"serverHostid" : {
"hostidValue" : "A44CC82AA4DF",
"hostidType" : "ETHERNET"
},
"updateTime" : "2019-02-01T10:17:01.161Z",
"trusted" : false,
"correlationId" : "d6098224-4932-427b-9401-a10fbcd624fc",
"requestOperation" : "REQUEST",
"collectedHostIds" : "STRING A44CC82AA4DF5B3DBD32",
"hostid" : {
"hostidValue" : "A44CC82AA4DF5B3DBD32",
"hostidType" : "STRING"
},
"expiry" : "2019-02-01T10:24:01.161Z"
}, {
"id" : 7750,
"servedStatus" : "NORMAL",
"requestHostid" : {
"hostidValue" : "F8CAB81C5A31AEE23B12",
"hostidType" : "STRING"
},
"machineType" : "UNKNOWN",
"serverHostid" : {
"hostidValue" : "A44CC82AA4DF",
"hostidType" : "ETHERNET"
},
"updateTime" : "2019-02-01T10:17:12.458Z",
"trusted" : false,
"correlationId" : "10232034-a692-471a-a4f2-e4863034fdd0",
"requestOperation" : "REQUEST",
"collectedHostIds" : "STRING F8CAB81C5A31AEE23B12",
"hostid" : {
"hostidValue" : "F8CAB81C5A31AEE23B12",
"hostidType" : "STRING"
},
"expiry" : "2019-02-01T10:24:12.458Z"
} ]
Listing all license features currently checked out by a client machine:
After running the command at the previous step and identifying the target client machine, the corresponding ID can be used in the command below to list all license features currently checked out by the given client machine.
http://localhost:7070/api/1.0/clients/<clientID>/features
where <ClientID> should be replaced by the correct ID.
For example, running the command for the second ID listed in the above output ("id" : 7750):
http://localhost:7070/api/1.0/clients/7750/features
provides the output below.
The output shows only 1 id, which means that this client machine is currently checking out only one license feature. By looking to the field called "featureName" (highlighted in red) the name of the license feature is reported: “sv_idl”. This is the license features used when starting IDL.
[ {
"id" : 30006,
"usageKind" : "CONCURRENT_USAGE",
"reservedCount" : 0,
"useCount" : 1,
"feature" : {
"id" : 218,
"type" : "CONCURRENT",
"used" : 2,
"receivedTime" : "2019-02-01T09:50:45.000Z",
"expiry" : "2019-12-30",
"vendor" : "idl_lmgrd",
"meteredReusable" : false,
"borrowInterval" : 5184000,
"notice" : "Account name",
"issuer" : "Harris",
"featureCount" : 4,
"featureName" : "sv-idl",
"overdraftCount" : 0,
"vendorString" : "MNT-55XXXXX:AAAA-BBBB-CCCC-DDDD:20EIDLLIC: ENVI+IDL 5.5 License",
"featureVersion" : "8.7",
"issued" : "2019-02-01",
"featureKind" : "NORMAL_FEATURE",
"starts" : "2019-01-31",
"meteredUndoInterval" : 0,
"renewInterval" : 15,
"featureId" : "1c63-9dltnz",
"metered" : false,
"uncappedOverdraft" : false,
"uncounted" : false,
"reserved" : 0,
"concurrent" : true
}
} ]
Listing all license features available in the license server:
To list all license features available in the license server, please use the following command:
http://localhost:7070/api/1.0/features
Please note that the output is limited to 20 features, by default. If there is a larger number of features, you may need to add qualifiers to increase the displayed quantity and page. For example:
http://localhost:7070/api/1.0/features?page=1&size=100
Note that 100 is the maximum size. If there are more than 100 features to display, then you must iterate through the pages:
http://localhost:7070/api/1.0/features?page=1&size=100
and so on. If a subsequent page is blank, then that means there aren't any more features to display.
Checking if a specific license feature is currently in use:
When checking out licenses from a license server, it can be helpful to know the current usage of a specific license feature, for example to be sure that a specific license feature is free to be used on a new client machine. In the example below, we are inspecting the current usage of the feature “sv-idl”, the feature which is checked out when running IDL.
Here the command to be used:
http://localhost:7070/api/1.0/features?name=sv-idl
and here the output, showing that the inspected feature is currently used 2 times ("used" : 2) and that the total feature count available is 4 ("featureCount" : 4). This means that there are 2 remaining features available.
[ {
"id" : 218,
"type" : "CONCURRENT",
"used" : 2,
"receivedTime" : "2019-02-01T09:50:45.000Z",
"expiry" : "2019-12-30",
"vendor" : "idl_lmgrd",
"meteredReusable" : false,
"borrowInterval" : 5184000,
"notice" : "CRM Internal Test Account - Europe",
"issuer" : "Harris",
"featureCount" : 4,
"featureName" : "sv-idl",
"overdraftCount" : 0,
"vendorString" : " MNT-55XXXXX:AAAA-BBBB-CCCC-DDDD:20EIDLLIC: ENVI+IDL 5.5 License ",
"featureVersion" : "8.7",
"issued" : "2019-02-01",
"featureKind" : "NORMAL_FEATURE",
"starts" : "2019-01-31",
"meteredUndoInterval" : 0,
"renewInterval" : 15,
"featureId" : "1c63-9dltnz",
"metered" : false,
"uncappedOverdraft" : false,
"uncounted" : false,
"reserved" : 0,
"concurrent" : true
} ]
------------------------------------------------------------
created on 3/20/2019 by CS
reveiewed by BC on 3/20/2019