...
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
...
Please note:
- If you use the Charon Linux Toolkit for Charon-AXP/VAX, you can use it to monitor the emulator log files and have it provide alerts should the license be removed or otherwise become unavailable.
- Please refer to Charon Linux Toolkit for more information. The rest of this section provides an example of how to monitor the emulator log files with generally available Linux tools should it not be possible to use the Linux Toolkit.
Div | ||
---|---|---|
| ||
The log-file contents differ depending on Charon products and versions as shown in the following examples.
...
The following very basic example shows how to monitor the emulator log files with logwatch and send an email if the dongle removal message appears in the emulator log file.
This example does not apply to Charon-SSP Baremetal.
...
Please note:
- Most of the messages show in the examples above are not written to the emulator log file immediately when the license is removed. They are written when the periodic license check is performed. Exception: Charon-AXP/VAX 4.9 and Charon-PAR 1.10 and higher also write messages to the emulator log - with a short delay - that reflect the messages written to the system log by aksusbd. The aksusbd daemon reports the removal of a license almost instantaneously in the system log.
- If possible, use the monitoring capabilities of the Charon Linux Toolkit. This will provide alerts for both message types and additional monitoring features, for example monitoring and alerting based on counters.
Installing logwatch
Logwatch is available via the standard repositories of the supported Linux versions. If it is not yet installed, the installation can be performed using the command:
...
To change settings in the general logwatch configuration, copy the file /usr/share/logwatch/default.conf/logwatch.conf to the directory /etc/logwatch/conf/. In this copy you can modify the settings as desired. For example, the email address to which notifications will be sent.
...
Most of the general settings can also be modified by command-line parameters when starting the program. Please refer to the logwatch man page.
The following files must be added to the logwatch configuration in order to monitor the Charon log file:
...
Div | ||
---|---|---|
| ||
Logwatch Example
Please note:
- This example is very much simplified and will not work for all cases. Should the Charon log file format change in the future, it will have to be modified. It is intended to demonstrate the concept and is not a solution suited for a production environment.
...
- The examples of the analysis script and the time stamp adaption script are specific to the Charon-AXP and Charon-VAX products. Different formats are required for the Charon-SSP and Charon-PAR products.
1. Create the log file definition file:
...
The name of the log file must be specified relative to the LogDir parameter (default /var/log). Wildcards are possible.
...
Please note:
- The Charon-AXP/VAX log file configuration can be set to automatically rotate the log file at configurable intervals. If this is the case, the currently active log file can be accessed by a symbolic link with the default name
<hw-model>.log.
The LogFile parameter can be set to the symbolic link. As the logwatch command is typically started via the cron utility, it will automatically use the current log file. Other Charon products also provide a log-rotation feature. Please refer to the appropriate product documentation for details.
...
- Even though there would have to be frequent runs to catch the message about a removed dongle before the emulator stops, there is a small risk that the log rotation and the logwatch run could overlap, causing the dongle removal message to be missed. Hence, the use of rotating log files is not recommended when using logwatch. This risk can be avoided by using the Linux Toolkit.
...
- Some versions of logwatch convert the log file path to lowercase. This prevents the log files from being found if uppercase characters are used in the LogDir target. A workaround is to create a symbolic link consisting of lowercase characters pointing to the target directory and to use the symbolic link as the LogDir value.
2. Create the service definition file:
...
|
Please note
...
: for Charon-AXP/VAX version 4.9, the egrep-line above must be adapted to the new log-messages format.
For example to "if echo $LINE|egrep '(00000424|Communication with the license key|Application will stop)' &> /dev/null;"
4. Create a timestamp adaption script:
...
|
Please note
...
: the script above does not cover all parameters possible for the range parameter of logwatch. It is provided only as an example for informational purposes.
5. Run the logwatch command to check the Charon emulator log file for a removed license message:
...
Monitoring aksusbd Messages in the Linux System Log
...
The background process aksusbd logs its messages via the journald daemon. These logs can be extracted using the journalctl command.
...
|
...
Please note: If you use Charon-AXP/VAX, the Linux Toolkit can be used to implement this monitoring option.
Div | ||
---|---|---|
| ||
Charon License Expiration Check
...
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 Log monitoring on Windows (logmond). It contains detailed descriptions for using this tool on all supported Charon product versions.
...
|
Please 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).
...
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.
Div | ||
---|---|---|
| ||
Include Page | ||||
---|---|---|---|---|
|