Monitoring Licenses
This section describes how certain aspects of the license status can be monitored.
Introduction
The emulator periodically checks the presence of a valid license. The checking period is specified on the license (default: once per hour) and can be different for the different Charon emulator products. Should no valid license be found, this will be logged in the emulator log file. As the emulator continues to run only for a limited time without the license, it is important to receive timely information about the license problem. This section describes some methods for monitoring the log file on Linux and Windows.
Please note: Charon-AXP/VAX 4.9 and Charon-PAR 1.10 and newer will grant a grace period of 12 hours after all valid licenses have disappeared. Older versions of these products and other emulator products will continue to run without a license until the next scheduled license check (default 1 hour). Charon-SSP starting with version 3.0 will continue to run for two license check periods. The grace period varies significantly between products and versions of the same product!
Monitoring the Emulator on Linux
Emulator Log Files on Linux
If the log file location is not specified explicitly in the configuration, the default log file location on host-based Charon emulator products is as shown in the table below:
Charon Product | Default Log file Location |
---|---|
Charon-AXP/VAX | If the setting of the template configuration is used: directory from which the emulator instance was started. |
Charon-SSP | If instance was created using Charon-SSP Manager: /opt/charon-agent/ssp-agent/ssp/[sun-4m|sun-4u]/<configuration-name>/ |
Charon-PAR | The default location of the log file is the directory in which the emulator is started. Filename format: Old versions:
New versions:
|
Emulator Log Examples
The log-file contents differ depending on Charon products and versions as shown in the following examples.
The following Charon-AXP/VAX log file excerpt shows the message written after the license dongle has been removed for Charon-AXP/VAX versions before version 4.9:
20160809:185509:INFO :0:000003E6:ll_sentine(1820): Performing regular license check ... 20160809:185509:ERROR:2:000003E8:ll_sentine( 379): Sentinel HASP RunTime Error 7. 20160809:185509:INFO :0:00000351:ethane.cxx(3056): session: Detected removal of the license. Normal operation is supported for 59 minutes from now.
The following Charon-AXP/VAX log file excerpt shows the message written after the license dongle has been removed for Charon-AXP/VAX version 4.12. It shows the 12 hour grace-period introduced in version 4.9.
20220825:190522:WARN :1:0000024D:licenseman(1988): Communication with the license key "527889790" lost. 20220825:200323:INFO :0:0000024D:licenseman(1981): Performing regular check of the current license. 20220825:200323:WARN :1:0000024D:licenseman(1988): Unable to log in to the key "527889790", feature 0. 20220825:200323:ERROR:2:0000024D:licenseman(1996): HASP runtime (50): Unable to locate any Feature matching scope. 20220825:200323:WARN :1:0000024D:licenseman(1988): Failed to login at the Sentinel HASP key: "527889790". 20220825:200323:INFO :0:0000024D:licenseman(1981): Checking the available license key "527889790". 20220825:200323:WARN :1:0000024D:licenseman(1988): Unable to log in to the key "527889790", feature 0. 20220825:200323:ERROR:2:0000024D:licenseman(1996): HASP runtime (50): Unable to locate any Feature matching scope. 20220825:200323:WARN :1:0000024D:licenseman(1988): Failed to log in to the Sentinel HASP key: "527889790". 20220825:200323:WARN :1:0000024D:licenseman(1988): Connection to license key:"527889790" id:"1000.826" lost. Application will stop at 26-Aug-2022 08:03:23. 20220825:200323:INFO :0:00000424:licenseman(2068): session: Detected removal of the license. Normal operation is supported till 26-Aug-2022 08:03:23.
The following Charon-SSP log file excerpt shows the message written after the license dongle has been removed:
|
The following Charon-PAR version 1.7.4 log file excerpt show the message written after the connection to the license dongle has been lost or the dongle has been removed:
20160927:150512.34743:PDC CHASSIS:0XCE0F State= INITIALIZE 20160927:150619.152882:Device EWA0 (enp6s0) : RX up 20161009:200646.683932:err:Contact with license key lost ... 20161009:200646.684279:err:Please reinsert the key within 15 minutes otherwise emulator will stop. |
The following Charon-PAR version 1.11 log file excerpt show the message written after the connection to the license dongle has been lost or the dongle has been removed:
|
Monitoring Tools
Linux Toolkit for Charon-AXP/VAX and Charon-PAR
The Linux Toolkit provides monitoring functions covering the license-specific log information. For example:
- License connecting/disconnecting (license lost/restored messages and license removal)
- Change of a license
- License expiration warning
- The next version of the Toolkit will also enable monitoring the Sentinel runtime error log
Please refer to Charon Linux Toolkit for more information.
Samples of Open Source Tools for Charon-SSP Hosts and other Linux Hosts
There are commercial tools that can be adapted to monitor the Charon emulator log files. However, there are also some Open Source tools that can be used (with the proper customization). Two examples are listed below (this does not constitute a recommendation - but is meant to illustrate what may be available in the Open Source area):
- Logwatch
Logwatch is a customizable, pluggable log-monitoring system. It will go through your logs for a given period of time and create a report in the areas that you wish providing the detail that you wish. It is easy to use, but will have to be customized for use with the Charon emulator log files. - Zabbix
A professional comprehensive monitoring tool that can be adapted to most customers' needs. There are also companies providing professional support for customization and implementation.
Charon License Expiration Check
The Charon Linux Toolkit includes a license expiration check utility that can send alert emails, and/or execute a custom script, a specified number of days before the license expires.
This utility can be installed in standalone-mode to be used on Charon-AXP, Charon-VAX, Charon-SSP and Charon-PAR without installing the Charon Linux Toolkit.
To download the utility, you must issue a request via email to the Stromasys support team or ask your reseller.
Please refer to How-to install Charon license expiration check on a Linux server for detailed installation and configuration instructions.
Monitoring aksusbd Messages in the Linux System Log
The background process aksusbd and hasplmd log their messages via the journald daemon. These logs can be monitored by the Linux Toolkit. Alternatively, they can be extracted using the journalctl command.
Example: to extract messages specific to the aksusbd software for the last five minutes, use the following command:
$ journalctl --since="$(date '+%Y-%m-%d %H:%M:%S' -d '5 minutes ago')" -t aksusbd --no-pager |
If a dongle had been removed within this time span, the output is similar to the following:
Aug 12 14:57:49 host1 aksusbd[17450]: aksusbd_usb_dev_remove: device '/dev/aks/hasp/1-14.2'
|
If a dongle is connected, a message similar to the following will be displayed:
Apr 11 19:44:37 redhat7.localdomain aksusbd[15047]: aksusbd_usb_dev_connect: device '/dev/aks/hasp/2-1'
|
A journalctl command similar to the one above can be run regularly within a cron-job that sends an alert if the license has been removed. This method of monitoring has the advantage of being independent of different emulator log file formats and the different check periods set for the individual products.
Charon-AXP/VAX version 4.9 and Charon-PAR version 1.10 and newer also show messages corresponding to the journalctl messages in the emulator log file (with a delay of about one minute) that can be captured by log monitoring tool such as logwatch. Below is a sample for the Charon-AXP/VAX product:
|
Please note: If you use Charon-AXP/VAX, the Linux Toolkit can be used to implement this monitoring option.
Charon-PAR Special Monitoring Options
Charon-PAR versions 1.10 and higher offer an additional feature to support alerts in the case of license problems.
The Charon-PAR configuration file supports the following new parameters that can be used to alert the user to potential license problems:
Parameter | Description |
---|---|
hasp_lost_usr_cmd | Runs a user-defined script or a executable if Charon disconnects from current valid license and no other valid license is found. This action is called every hour during the 12 hours grace period (at the end of which Charon-PAR stops unless a license has been found). The script or command started receives three parameters from Charon-PAR: Usage example: |
license_changed_usr_cmd | Runs a user-defined script or an executable when Charon-PAR disconnects from one license and connects to another for any reason. The script or command started receives four parameters from Charon-PAR: old-key-id, old-product-license-id, new-key-id, and new-product-license-id. Usage example: |
license_expiration_warning_usr_cmd | Runs a user-defined script or an executable when the license expiration time is within few hours. The default setup is: starting 24 hours before expiration this script is invoked each hour. The script or command started receives three parameters from Charon-PAR: Usage example: |
License logging level:
Starting with Charon-PAR version 1.11, periodic (once per hour) log messages indicating a successful periodic license check are disabled by default to avoid cluttering the log file. They can be re-enabled by adding the parameter
system.license_logging_level = 2
to the emulator configuration file. Setting the parameter to 0 or 1 will disable the messages.
Please note that this parameter must be placed towards the end of the configuration file and will not work if placed before the memory configuration.
Monitoring the Emulator Log File on Microsoft Windows
Emulator Log Files on Windows
The log file is stored in the home directory defined when creating the Charon instance via the Virtual Machines Manager. (The Virtual Machines Manager always starts an emulator instance as a service.)Version As Service Log File Location < 4.8 Yes Log files are stored in the home directory of the service. < 4.8 No The log file is stored in the same directory as the configuration file of the Charon instance. >= 4.8 Yes
Emulator Log File Examples
The following Charon-AXP/VAX log file excerpt (before version 4.9) shows the message written after the license dongle has been removed:
20160809:185509:INFO :0:000003E6:ll_sentine(1820): Performing regular license check ... 20160809:185509:ERROR:2:000003E8:ll_sentine( 379): Sentinel HASP RunTime Error 7. 20160809:185509:INFO :0:00000351:ethane.cxx(3056): session: Detected removal of the license. Normal operation is supported for 59 minutes from now.
|
The following log file excerpt from Charon-AXP/VAX 4.9 shows the messages written after the license has been removed, the periodic checks to verify whether the license has become available again, and finally the message to indicate the stop of the emulator due to the missing license:
|
Please note that not all messages are shown in the log excerpt above because the configuration parameter log_repeat_filter was set to on (default).
To receive all messages, this parameter must be set to off in the emulator configuration file. This will create a more detailed output as shown below. In particular, it shows the grace period after which the emulator will stop:
|
The following Charon-AXP/SMA log file excerpt shows the message written after the dongle has been removed:
2016-10-04 01:43:15:231: ES40-1: license: Error 7, CHARON can't detect HASP key and will shutdown within 60 minutes 2016-10-04 01:58:15:243: ES40-1: license: Error 7, CHARON can't detect HASP key and will shutdown within 45 minutes 2016-10-04 02:13:15:253: ES40-1: license: Error 7, CHARON can't detect HASP key and will shutdown within 30 minutes 2016-10-04 02:28:15:260: ES40-1: license: Error 7, CHARON can't detect HASP key and will shutdown within 15 minutes 2016-10-04 02:43:15:269: ES40-1: license: Emulator stopped on error 7...Appropriate license key is not present
|
Monitoring Tools
Charon Log Monitor for Microsoft Windows
Charon-AXP/VAX/PDP come with the logmond (Log Monitor & Dispatcher) utility. This utility can monitor the emulator log for events indicating that the license has been removed.
Please refer to CHARON on Windows - Charon Log Monitor. It contains detailed descriptions for using this tool on all supported Charon product versions.
There is no comparable utility for the Charon-AXP/SMA product.
License Expiration Check on Microsoft Windows
Starting with Charon-AXP/VAX/PDP version 4.8 the license expiration check utility is installed with the Charon emulator kit. The details of this utility are described in the user's guides of the Charon-AXP/VAX/PDP for Windows. This section provides a short overview.
This utility is executed once a day at 09:00 AM and will send Windows Application Events 15 days before license expiration. No other action will be taken unless you customize the expiredlicense.bat
script.
The installation process installs the utility and the default expiredlicense.bat
file under the Charon installation folder, usually in C:\Program Files\CHARON\
Redistributables\Stromasys
. It also provides examples on how to send alerts via email.
Please note:
- If you installed this utility manually before installing Charon-AXP V4.8, the scheduled task will remain unchanged.
- If you remove all Charon emulator products from the server, the scheduled task will be disabled. It will not be deleted.
- For versions prior to Charon-AXP/VAX 4.8 the utility can be installed manually. Please refer to Charon on Windows - Automated License Expiration Check for details on the use of this tool.
© Stromasys, 1999-2024 - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described.