pmonGetPID()

The function pmonGetPID() returns the process ID of a WinCC OA manager.

Synopsis

int pmonGetPID(int idx);

Parameters

Parameter Description
idx The WinCC OA manager index. See chapter Details on the Pmon

Return value

The function pmonGetPID() returns the process ID of a WinCC OA manager or in the event of errors, -1.

Description

The function pmonGetPID() returns the process ID of a WinCC OA manager. A manager is started in the WinCC OA console and the PID is shown in the console - see figure below.

Figure: WinCC OA console and process IDs of managers

Note: The function can only be used on a local computer. A remote UI cannot query the PMON of a server. The function does not work if WinCC_OA has been started as service. In cannot query the PMON of a server. The function does not work if WinCC_OA has been started as service. In this case, use pmon_query with the command MGRLIST and the sub command STATI. See chapter Details on the Pmon.

EXAMPLE

In the following example, the names as well as the process IDs of WinCC_OA managers are returned and output.

  1. main(mapping event)
    
    
    {
    
    
      string pName;
    
    
      int i, pID;
    
    
      for (int i = 0; i < pmonGetCount(); i++)
    
    
      {
    
    
       pID   = pmonGetPID(i);
    
    
       pName = pmonGetName(i);
    
    
       DebugN("Manager name: ", pName, "Process ID of the manager:", pID);
    
    
      }
    
    
     }

The function outputs the names as well as the process IDs of the managers as follows:

WCCOAui2:["Manager name: "]["WCCILpmon"]["PID:"][8032]

WCCOAui2:["Manager name: "]["WCCILdata"]["PID:"][5168]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["PID:"][9452]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["PID:"][5724]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["PID:"][4980]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["PID:"][5764]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["PID:"][9876]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["PID:"][12180]

WCCOAui2:["Manager name: "]["WCCILevent"]["PID:"][5352]

WCCOAui2:["Manager name: "]["WCCILproxy"]["PID:"][10200]

WCCOAui2:["Manager name: "]["WCCOActrl"]["PID:"][1304]

WCCOAui2:["Manager name: "]["WCCILsim"]["PID:"][12324]

WCCOAui2:["Manager name: "]["WCCOAui"]["PID:"][4988]

Assignment

PMON functions.

Availability

UI