01 February 2023
This article is a brief summary of several detailed articles about configuring ClearSCADA logging that can be found in the Logging and Log File Analysis section. It should be understood that in most cases the default logging settings in ClearSCADA are only sufficient to capture a time window of a few minutes. One should always make sure that ClearSCADA logging is configured to capture events over a sufficient time window in order for log files be useful when troubleshooting issues.
The information provided below will explain how to increase the number of log files for ClearSCADA server, drivers and clients.
For more information about each type of ClearSCADA logging please go over the dedicated articles in the Logging and Log File Analysis section.
This article covers the following topics:
- Setting up Server Logging
- Setting up Driver Logging
- Setting up Snapshot Logging
- Setting up DBClient Logging
- Setting up ViewX Logging (for ClearSCADA 2014 R1 onwards)
- How Much Logging is Sufficient?
Setting up Server Logging
To configure server logging, please right click on the ClearSCADA Server Icon and select Configuration. Once the Server Configuration dialog is displayed, navigate to the page shown in the screen capture below and change Maximum Size Of Each File, Maximum Number of Files and Number of Old Files to Keep to sufficient values. The location of the server log files is shown in File Base.
Sometimes a Schneider Electric engineer might ask you to enable/disable certain server logging options. To do such, please right click on the ClearSCADA Server Icon and select Status for the Status dialog to get displayed. Once the dialog is displayed, navigate to the section below for a list of all server side logging options available in ClearSCADA. To enabled/disable an option, right click on the option and select Enable/Disable respectively.
Setting up Driver Logging
To configure driver logging, please right click on the ClearSCADA Server Icon and select Status. In the Status dialog, navigate to the section below for a list of all ClearSCADA drivers installed on the server. Right click on the particular driver and select "Logging...". Under the Configuration tab, increase Maximum Size of Each File, Maximum Number of Files and Number of Old Files to keep to sufficient values. File Base shows the location of the driver log files.
Sometimes a Schneider Electric engineer might ask you to enable/disable certain driver logging options. To do such, navigate to the Current Options tab in the Driver Logging dialog as per the screen capture below. To enable (disable) additional logging options, select (deselect) the required option from the Options list and apply the change.
Setting up Snapshot Logging
On some occasions a Schneider Electric engineer might ask you to increase the amount of ClearSCADA snapshot log files. To do that please right click on the ClearSCADA Server Icon and select Configuration. Navigate to the Registry section (shown in the screen shot below) and increase LogMaxFile, LogMaxSize and LogOldFiles to the requested amount. The location of the DBSnapshot log files is shown in LogFileBase.
Setting up DBClient Logging
To configure DBClient logging, open up Windows Registry and navigate to \HKEY_CURRENT_USER\Software\Schneider Electric\ClearSCADA\DBClientNamed. Make sure the logging is enabled and increase LogMaxFiles, LogMaxSize and LogOldFiles values. The location of the DBClientNamed log files is shown in LogFileBase.
Setting up ViewX Logging (for ClearSCADA 2014 R1 onwards)
ViewX in CS2014 R1 onwards uses WPF and .NET technologies. The configuration of this new ViewX application uses SE.Scada.ViewX.exe.config XML files located adjacent to the SE.Scada.ViewX.exe application itself (%ProgramFiles(x86)%\Schneider Electric\ClearSCADA\ SE.Scada.ViewX.exe.config).
In File Browser, with no visible extensions:
In command line or with file extensions visible:
And the SchneiderElectric.Scada.ViewX.Properties.Settings element defines its configuration. Specifically, to control logging, the following elements’ values need changing:
|It is likely that the SE.Scada.ViewX.exe.config file will require administrator permissions to edit the settings.|
To edit settings, open the editor (e.g. Notepad) as administrator and then open the XML configuration file from within the editor.
|Note that an upgrade of ClearSCADA will overwrite the existing XML configuration file with the default configuration.|
The XML configuration file will need to be re-configured after an upgrade of ClearSCADA takes place.
How Much Logging is Sufficient?
When the maximum number of log files that ClearSCADA generates is reached, the oldest log files get overwritten and information they contain gets lost. Therefore one should always make sure the log files of interest get collected before they get overwritten. The number of log files to keep is specific to each application as the amount of information logged depends on the nature of the application, the size of the database, drivers used, logging options enabled etc. Ideally one would want ClearSCADA log files to at least capture a time window of several days to cover weekends, long weekends and other long holidays to make sure the log files do not get overwritten when there is no one is available to collect them. To check how much time is captured by a certain type of ClearSCADA log files, one could simply locate the set of these log files using their File Base and check Date Modified of the first and of the last log file of the same type.
Be aware that enabling (disabling) additional server or driver logging options will reduce (increase) the time window captured by ClearSCADA logging. This means that the amount of log files of a particular type that ClearSCADA generates will need to be adjusted accordingly to capture the same time window.
|Please be mindful of the space available on your hard drive. For example, if Maximum Size Of Each File is set to 5000KB, |
Maximum Number of Files is set to 25 and Number of Old Files to Keep is set to 2, the required space on the hard drive is going to be:
Maximum Size Of Each File x Maximum Number of Files x (1 current set + Number of Old Files to Keep) or
5000KB x 25 x (1 + 2) = 375000KB
Where 375000 / 1024 = 366MB
Planning which disk / partition is going to store log files is important, to avoid impacting other ClearSCADA file-relate operations – e.g. consider using a separate disk for log files.
Planning and configuring log file collection at the time deployment of the system is planned is important. For instance, reserving insufficient disk space and switching ‘off’ many of the default categories of logging for normal operation of the system will be a problematic position: when a problem is detected and logs are required to investigate the problem, little information will be in the logs and re-dimensioning disks/partitions may be necessary to get the logging required to investigate the problem on a subsequent occurrence. Whereas, well planned and sufficient, default logging, will hopefully provide sufficient information to investigate a single occurrence of a problem.