MIB

MIB

As already mentioned the data that is exchanged via SNMP is saved in so called MIBs (Management Information Base). MIB is a file where data is defined in a tree structure. Thus, the WinCC OA data as well as the data of network devices is stored in a MIB.

A unique standard is used to define the MIB variables (define variable types etc.). The standard is called SMI (Structure of Management Information). The MIB descriptions define how the elements are structured. The object identifier (OID) identifies the MIB variables. The MIB OIDs are released by the manufacturers of the agents or published in the Internet. Furthermore, there are standard MIBs for the administration of networks. You can view the MIB definitions via a text editor. The manager requests the data via a command (get).

WinCC OA MIB

The data can be divided in two categories. The first category is the data that is provided (by the Pmon agent) already before the project is started. This is the data that is stored in the shared memory by the PMON service.

The second category is the life data that is transferred via the WinCC OA agent. The data is only provided when the corresponding agent is running and is connected to the Event manager. The following table shows the information provided by the Pmon and live agent. The data provided by the Pmon agent is shown as blue in the following table. The data provided by the live agent is shown as yellow. The SNMP Manager can affect the data elements pmonCommand(3) and ctrlScriptReq(12) active. Each box of the figure corresponds to a data point element. The running process cannot be influenced by the elements (the elements are read-only).

Figure 1. Structure of the ETM MIB

The WinCC OA MIB was structured so that it can be extended consistently. In order to conform to SMIv2 all names are in English and they begin with a lower case letter. A MIB identifier may additionally not contain _ or -.

The elements are described in detail in the following table:

Name OID Agent Meaning
etmModules ...13828.1 In order to guarantee the extensibility and administration according to SMIv2 a node that allows the registration of all trees was included in the MIB. At the moment there is only the WinCC OA part tree and thus there is only one sub element here.
etmAgentVersion ...13828.1.1.0 A string that indicates the version of the WinCC OA SNMP agent.
pvss2MIB ...13828.1.2 This entry contains information about the pvss2MIB (pvss2MIB belongs to the ETM MIB).
pvss2 ...13828.2 This is the pvss2MIB module. Since this module has the number 2, the number 2 was also assigned to the corresponding entry in the etmModules branch.
project ...13828.2.1 This is the highest node for a WinCC OA project. The number is 1 by default. Only one project is supported in the first implementation phase (WinCC OA Environment Variable). In order to get the changes the Pmon agent has to be stopped and restarted in case of a project change.
projName x.1.0 PMON, RO

A string that contains the name of the project. This name is acquired in connection with the Pmon and identifies the WinCC OA project unique.

The project name is read directly from the log file.

pmonState x.2.0 PMON, RO

An integer value that provides information about the status of the Pmon service.

0 ... halted, 1 ... init, 2 ... running

pmonCommand x.3.0 PMON, RW A command can be sent to the Pmon agent via this string. Use the same syntax as when communicating directly via TCP.
pvssAgentState x.4.0 PMON, RO

This element provides information about the status of the SNMPAgent. The SNMPAgent serves as a proxy to get the WinCC OA Live data. This is a mirroring from the manager table according to x.N. Thus, the data is redundant but you can access it without further comparison of the manager name.

0 ... halted, 1 ... init, 2 ... running

logDirSize x.5.0 PMON, RO The SNMP agent monitors the size of the log directory. Contrary to the Pmon that only monitors the WinCC OA.log file, this element represents the sum of all log files. Thus, all other files can be monitored too. The size is specified in KBytes.
nofManagers x.6.0 PMON, RO The Pmon specifies how many manager entries exist at the moment. For the appropriate information on the single managers see x.10.
managerTable x.10 The SNMP agent serves for the administration of the WinCC OA systems. In addition to the control of the project via the Pmon, the WinCC OA MIB also represents the states of all managers in this table. You can affect the project active for consistency reasons, only via the Pmon service. The only way to affect the project settings and the manager status is the element x.3. All entries of the table are ReadOnly.
manIndex Index of the manager
manName x.10.1.2.idx PMON, RO A WinCC OA manager that is registered in the project. The name points to the exe file.
manType x.10.1.3.idx PMON, RO

The manager type. This type is important to be able to assign the information of the statistics data points. Since the type is not included in the PmonTable yet it has to be implemented. Otherwise there is no assignment to the Live data.

0 .. unknown, 1 .. event, 2 .. driver, 3 .. data, 4 .. ui, 5 .. ctrl, 6 .. ascii, 7 .. api, 8 .. device, 9 .. redu, 10 .. report, 12 .. dist

manNum x.10.1.4.idx PMON, RO The manager number
manOptions x.10.1.5.idx PMON, RO Start options of the manager.
manState x.10.1.6.idx PMON, RO

The current state of the manager. Only when this element is "running" also the following two elements have a meaningful value.

0 ... halted, 1 ... init, 2 ... running

manStartTime x.10.1.7.idx PMON, RO The time of the last program start
manPID x.10.1.8.idx PMON, RO The PID of the process.
manStartMode x.10.1.9.idx PMON, RO

The start settings

0 .. manual, 1 .. once, 2 .. always

secKill x.10.1.10.idx PMON, RO Time in seconds until Kill
restartCount x.10.1.11.idx PMON, RO Number of start retries before the tries are canceled.
resetMin x.10.1.12.idx PMON, RO Time that a manager has to run before a restartCounter is set to 0 again.
ctrlScriptReq x.12.0 AGENT, RW Via this element a function can be called in a specific control library. The value of this MIB variable is written to the internal live agent data point. The value of this MIB variable is written to the internal live agent data point element _x_SNMPLiveAgent.Command. With this data point element later a CTRL script can be triggered. The result of this function can be represented in the following element. Since this is a TextVar, commands can be implemented like in the Pmon.
ctrlScriptRes x.13.0 AGENT, RO If the function is called via x.12 the result can be represented here in text form. The specific trap is represented on 1.3.6.1.4.1.13828.2.1.13.0
dpTable x.20 This table is used to publish data points that are defined in the Live Agent data point. The table consists of five columns. In addition to the name of the data point also online value, status bits, the online time and the user are passed. Other values are not provided yet. Furthermore, you cannot set original values via this table at the moment. The values can be affected and set only via the control functions under x.12. Thus, you can monitor better the setting of the values. The table is evaluated by the WinCC OA Live Agent and the values are only available via this manager.
dpElementIndex Index of the data point.
dpElementName x.20.1.2.idx AGENT, RO Name of the data point (Config.Detail.Attribut is possibly included. Intended for a later extension)
dpElementValue x.20.1.3.idx AGENT, RO Online value of the data point element that was described above. The value is transferred as string.
dpElementTime x.20.1.4.idx AGENT, RO Online time when the value was set.
dpElementBits x.20.1.5.idx AGENT, RO Status bits of the DP element described above.
dpElementUser x.20.1.6.idx AGENT, RO User of the above described DP element.