7.23. Troubleshooting

In order to allow troubleshooting if anything goes wrong or if you suspect a part of IDERI note to malfunction, all critical code paths in the IDERI note client and service components write log files or can be instrumented to write log files. Note that log files are written on a per-thread level, not on a per-process level. This means that one client or service process writes multiple log files simultaneously, with one log file per thread of execution. While the log file settings cannot be customized for the client components, logging can be fine-tuned for the IDERI note service. Those functions in the IDERI note service that are invoked as a remote procedure call can in theory always be executed in an arbitrary new thread, although the RPC runtime will use a thread pooling mechanism for them. Anyway, since the thread in which a remote procedure call executes is not created by the IDERI note service’s code but instead by the RPC runtime, it will also create a separate log file for each call, if logging is enabled for such a function. Therefore you will not only find thread names in the user interface for managing logging of the IDERI note service, but also function names.

Note: You should only change the default logging settings of the IDERI note service for troubleshooting purposes and when advised to do so by IDERI support. Changing the logging settings can severely affect performance of the IDERI note service. By default, only those threads are enabled for logging that do not affect overall performance during operation of the service, such as the service’s primary thread and the thread for the service’s ServiceMain routine.

The logging settings can be customized by invoking the IDERI note control panel applet on the computer where the IDERI note service is running. You can invoke it by browsing in the control panel for the applet labeled “IDERI note 2.7” and double-clicking on its icon.

On a server core installation of Windows® Server 2008 you can start the applet by invoking the executable corecfg.exe in the installation directory of the IDERI note service. If you invoke the control panel applet and select the second tab labeled “Logging”, the screen will look like in figure 7.82.

The logging page of the IDERI note control panel applet with default settings

Figure 7.82: The logging page of the IDERI note control panel applet with default settings

This page has two list controls with function/thread names. As a side note, the function names are actually the function names in the IDERI note source code and are also used to derive a log file name. The upper list control contains those functions/threads that currently create no log file while the lower list control contains those functions/threads that are currently enabled to write log files. The number in the lower list control’s second column is the number of simultaneous log files that are kept on disk. If a new log file for a specific type of function/thread is created, all older log files of the same type are enumerated. If their total number exceeds the number specified in the lower list control, old log files will be deleted, starting with the oldest log files, until the number of log files of the specified type drops to the specified number. Using this simple mechanism, the hard disk will not be swamped with log files.

In order to instrument a specific thread or function to write a log file, the function name must be selected in the upper list control. Next press the button labeled “Move down”. As an example, we will do this now with the second function in the upper list control, labeled RpcInoteGetMsgIndexMaxMin. This will create the dialog that lets you specify the number of simultaneously existing log files of this type like in figure 7.83.

Specifying the maximum number of log files per function/thread

Figure 7.83: Specifying the maximum number of log files per function/thread

In our example we change the default value to 20 and click OK. This will move the function into the lower list control like in figure 7.84.

A new function added to the logging functions

Figure 7.84: A new function added to the logging functions

If you now click OK or the “Apply” button in the IDERI note control panel applet, the changes will be stored permanently and after a restart of the IDERI note server, log files for the function RpcInoteGetMsgIndexMaxMin will be created. You can easily recognize these log files because the name of the function, RpcInoteGetMsgIndexMaxMin, is part of the log file name with a sequence number added. Please refer to sections 11.3 and 11.1. for the directories where you can find the log files for your specific operating system version.