pmonGetRestartCount()

The function pmonGetRestartCount() returns the number of restarts set for a WinCC OA manager.

Synopsis

int pmonGetRestartCount(int idx);

Parameters

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

Return value

The function pmonGetRestartCount() returns the number of restarts set for a WinCC OA manager or in the event of errors, -1.

Description

The function pmonGetRestartCount() returns the number of restarts set for a WinCC OA manager. The number of restarts is shown in the console - see figure below.

Figure: WinCC OA console and number of restarts for the managers

NOTE that the function can only be used on a local computer. A remote UI cannot query the PMON of a server.

EXAMPLE

In the following example, the names as well as the number of restarts for WinCC_OA managers are returned and output.

  1. main(mapping event)
    
    
    {
    
    
      string pName;
    
    
      int i, reCount;
    
    
      for (int i = 0; i < pmonGetCount(); i++)
    
    
      {
    
    
       reCount = pmonGetRestartCount(i);
    
    
       pName = pmonGetName(i);
    
    
       DebugN("Manager name: ", pName, "Restart count:", reCount);
    
    
      }
    
    
     }

The function outputs the names as well as the number of restarts for WinCC_OA managers as follows:

WCCOAui2:["Manager name: "]["WCCILpmon"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCILdata"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCILevent"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCILproxy"]["Restart count:"][2]

WCCOAui2:["Manager name: "]["WCCOActrl"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCILsim"]["Restart count:"][3]

WCCOAui2:["Manager name: "]["WCCOAui"]["Restart count:"][3]

Assignment

PMON functions.

Availability

UI