getLicenseServerStatus
First introduced in version: 3.00.3.5
Syntax
getLicenseServerStatus()
Details
Retrieves the the status of license server, including the following information:
-
Whether a license server is being used
-
Whether the license server is disconnected
-
If the license server is disconnected, how many seconds remain available
This function is used for O&M monitoring and alert management, helping users detect license server connection problem in a timely manner and avoid business interruption.
Note: For guest users, the configuration parameter enableClientAuth must be set to true in order to use this function.
Parameters
None
Returns
Returns a dictionary containing the following keys:
-
isConnected: BOOL type, indicating whether the connection to the license server is normal. true means the connection is normal, false means it is disconnected. If the license server is not used, the value will be NULL.
-
secondsUntilShutdown: LONG type, indicating the remaining seconds until automatic node shutdown. -1 means the connection is normal or the license server is not used.
Examples
Example 1. License server in use, connection normal
getLicenseServerStatus()
/* Output:
isConnected->true
secondsUntilShutdown->-1
*/
Example 2. License server in use, connection disconnected
getLicenseServerStatus()
/* Output:
isConnected->false
secondsUntilShutdown->6000
*/
Example 3. License server not used (local license file)
getLicenseServerStatus()
/* Output:
isConnected->
secondsUntilShutdown->-1
*/
