Switching the licensing debug log to reduce file size

The lmswitch utility switches the debug log file written by a particular vendor daemon by closing the existing bug log for that vendor daemon and starting a new debug log with a new file name.

It also starts a new debug log file written by that vendor daemon if one does not already exist.

Using lmswitch can be useful, as debug log files can become very large over time.

To execute the utility, you will first need to create it in your <server_install>/3rdparty/bin directory:

  1. Navigate to <server_install>/3rdparty/bin.
  2. Locate the file lmswitchr and make a copy of it within the same directory.
  3. Rename the copied file to lmswitch.

    Note:  On Windows, make sure the file is an executable (.exe) file.

Now run the following command from <server_install>/3rdparty/bin :

lmswitch -c <license_file_list> <vendor> <new_debug_log>

where

  • <license_file_list> is the applicable license file(s)
  • <vendor> is the vendor daemon in the license file
    In this case, the vendor will always be klocwork (must be all lower case).
  • <new_debug_log> is the path to the new debug log file

Tip:  rlmswitch also allows you to keep separate log files for different ISV.

Note that this can be set up to run automatically. On Windows, it can be done using the Windows Task Scheduler; on Unix, it can be done using a cron job.

Important: If the License Server is restarted, you need to specify the log file, or the default log file will be overwritten.