Locks

Software locks are used to limit access to a resource in a multi-threaded application, such as the Geo SCADA Expert database server application.

The General branch of the Server Status Tool includes a Locks category that provides status information about the software locks that are in the Geo SCADA Expert serverGeo SCADA Expert creates an entry for each lock in the server. Depending on the system architecture, this might include entries for some resources that do not get used. For example, a lone server will include locks for main-standby, but those locks will not get used. The Locks category includes one row for each lock in the server.

Typically, you only need to view the lock status when asked to do so by Schneider Electric engineers—the engineers might use the status information to diagnose performance issues such as latency.

For diagnostic information regarding database locks in Geo SCADA Expert, see Lock Diagnostics Read and Lock Diagnostics Write. The Locks category displays all locks in the server, whereas database locks are specific to the 'Database' and 'Metadata' locks and assist in identifying which operation is causing high lock utilization.

The status information for each lock is categorized as:

For locks for which the Type is 'CS', the applicable columns below (other than Longest Excl Lock Reason) are only populated if extended lock diagnostics are enabled. Such diagnostics are disabled by default and the other columns display a hyphen (-) to indicate that no extended diagnostics data is available for that lock. Typically, you need only enable extended lock diagnostics if you are asked to do so by Schneider Electric. To enable extended lock diagnostics, do so via this registry key setting:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Schneider Electric\ClearSCADA\DB\ExtendedLockDiagnostics

Set the above registry key to True to enable extended lock diagnostics, or False to disable extended lock diagnostics, as applicable. Enabling extended lock diagnostics does not generate any extra logging, but does result in some additional computation for the extra diagnostics; this may or may not affect overall performance. The extra diagnostics can be useful when investigating locking-based issues, for example, if a lock is being held for much longer than expected. When a system is functioning as expected on a day-to-day basis, there is typically no need to have extended lock diagnostics enabled.

Be aware that entries in the list only update when the lock is locked or unlocked. As such, after changing the registry key's value, you might well find that a number of entries in the list remain unchanged initially. For example, they might continue to display the text 'Extended lock diagnostics disabled' in the Longest Excl Lock Reason column even after extended lock diagnostics have been enabled. Such entries will update when the lock is next locked or unlocked.

Even when the Longest Excl Lock Reason column does not display the text 'Extended lock diagnostics disabled' when extended lock diagnostics are enabled, other relevant columns below might still display a hyphen (-). This will occur if the resource has not been exclusively locked or unlocked since the extended lock diagnostics were enabled or last reset. For entries for which the Type is 'CS', this will be indicated by the Total Excl Lock Count and Excl Locks Per Second columns displaying a zero (0).

 

When extended lock diagnostics are enabled (see above), a context-sensitive menu is available when you right-click on an entry in the list. The menu provides these options:

The lock statistics are reset automatically whenever any of the following occur:

The exceptions to the above are entries for any locks that do not get used following the resetting of the lock statistics. As with other statistics, the entries will only update when, or if, the lock gets used. For example, if your system does not use System Calls, then the 'DB System Calls List' entry will not get updated after the lock statistics are reset.