Lua Instance Viewer

The Lua Instance Viewer provides a central view at the performance information of all Lua scripts running on a Core or Connector component.

The Lua Instance Viewer
Figure 1. The Lua Instance Viewer

Opening the Lua Instance Viewer

The Lua Instance Viewer can be opened by selecting it from the Open menu (shortcut: CTRL+SHIFT+L) or from 'Add item(s) to …​' section of the context menu for the object representing the Lue executing component (Core or Connector). When the Lua Instance Viewer display is opened via the Open menu, the Select Object dialog opens and the Lua executing component can to be selected from the I/O Model tree.

Once Lua Instance Viewer display is open, the inspected component can be changed by dragging and dropping the new component from the I/O Model tree onto the Lua Instance Viewer display.

The Menu

Table 1. Lua Instance Viewer Display Menu Bar Items
Element Shortcut Action

icon save

Ctrl+Shift+S

Calls the Save Display dialog

icon open

Ctrl+Shift+O

Calls the Open Display dialog

icon settings

-

Calls the Settings dialog

icon export

-

Exports the current contents of the grid into a file (CSV, MS Excel, JSON) and opens the file automatically

icon refresh 02

F5

Refresh grid based on current Time Period Setting

icon play

-

Play/Pause auto updating

The Columns

By default the Lua Instance Viewer shows a selection of helpful information on Lua instances. The columns to be displayed can be configured by clicking on icon select column 32 in the table header.

Custormizing the Displayed Columns
Figure 2. Custormizing the Displayed Columns

Available Columns in the Lua Instance Viewer Display (in alphabetical order)

Bold entries are active in the default column configuration.

  • Channel ID - low level information; please contact our support for details

  • Client Type - low level information; please contact our support for details

  • CPU Usage - the percent of a single CPU thread this Lua instance is using. The usage is not normalized to consider all CPU hardware threads.

  • Dedicated Thread - this is true for Lua instances which are running on their own dedicated threads.

  • Default Security Identity - low level information; please contact our support for details

  • Elapsed - if the Lua instance is currently running then this will specify the amount of time that has elapsed since it was most recently invoked, in nanoseconds. Otherwise this will be set to nil.

  • Elapsed converted a more readable representation of Elapsed (see previous entry)

  • Lua Instance Id - the id of the Lua instance

  • Memory Usage - the number of bytes of memory this Lua instance is using.

  • Memory Usage Converted - the amount of memory this Lua instance is using; in an easily readable format

  • Name - the name of the object associated with the instance

  • Object ID - the system ID of the object associated with the instance

  • Path - the system path to the object associated with the instance

  • Require Mode Strict - indicates if the Lua Library Permissions are set to strict

  • Source Sub Type - this is the sub-type of the source type of the Lua instance. It is used for channels to specify the channel type.

  • Source Type - this describes what kind of Lua instance the instance is. This can be one of the following string values: default, thread, lua_obj, lua_channel, or channel.

  • State - the state of the Lua instance. This can be one of the following values: idle, running, terminated, or disabled.

  • Total Runtime - the total amount of time that the Lua instance has been running, in nanoseconds

  • Total Runtime Converted - the total amount of time that the Lua instance has been running; in an easily readable format

The Tools of the Lua Instance Viewer

Besides providing information on the running Lua instances, the Lua Instance Viewer offers some tools for further investigation of Lua instances.

To load the object which is hosting a Lua script right click on the appropriate the table row and select Load in Property Panel from the context menu. Alternatively, if the row is already selected, you could press CTRL+SHIFT+L.

Lua Instance Viewer Context Menu - Load in Property Panel
Figure 3. Lua Instance Viewer Context Menu - Load in Property Panel

To find the object on which the Lua instance is running in the Model Tree panel, open the context menu for the table row with a right click and select Navigate in Tree. If the row is already selected, pressing CTRL+SHIFT+N can be used alternatively

In the context menu, users with Admin privileges can also also terminate Lua instances.

Warning Limits

In the Settings dialog of the Lua Instance Viewer display, warning limits can be configured for Memory Usage and CPU Usage. Values which exceed the configured High Limit are highlighted in yellow; those which exceed the High High Limit are highlighted in red.