Functionality of the Pmon

The Pmon manages the progs file (located in <proj_path>/config/). All starting managers and their monitoring parameters are entered into the progs file.

The maximum number of managers that can be defined in this progs file is 100. Each computer on which WinCC OA managers are running has its own progs file and also its own Pmon. If remote managers are started (a server project is used) a progs file is created.

The following figure shows the structure of the progs file and example entries.

Figure 1. progs file containing the manager entries
Note: mon only listens to "localhost" by default. This means that you can reach the pmon only via the localhost. Use the config entry localAddress to change the network address of a server.
Note: This file (Add manager/command line options) can be edited via the console panel. It should not be edited via a text editor!
Note: The progs file must always contain a blank line at the end of file.

The Pmon itself should be the first entry in the progs file so that also the status of the Pmon is shown in the console panel. The Pmon is not a WinCC OA manager but a background process with a monitoring functionality. The entries of the progs file are described in the following:

  • #Manager : Name of the WinCC OA manager (specify without the ending .exe)
  • Start: Three different start types can be specified here.
    1. manual - The Pmon does not start this manager automatically. The manager has to be started manually e.g. via the Console panel.
    2. always - The option always restarts the manager immediately when a project is started or after a crash/stop.
    3. once - Starts the manager only once when a project is started (not later).
  • SecKill: Number of seconds to wait before a manager is stopped via a kill -9 (the manager is forced to stop) if the manager does not respond to a normal -kill 15 (stops a manager normally. kill -15 waits that the manager stops). This is only used when a project is stopped.
  • Restart#: Specifies how often a manager is restarted (at most) within the set minutes of ResetMin after the manager was stopped or crashed.
  • Options : Specify here further command line options for the particular manager. For more information on the options of single managers see chapter Manager options.

Pmon prints information or other messages concerning the executed actions. The information and messages are printed into the PVSS_II.log file. The file is located in the directory <proj_path>/log and is shown via the log viewer. Possible errors during the start of a project are written into the <wincc_oa_path>/log/pmon_log.txt file. The Pmon writes additionally into the pmon.<hostname> file (e.g. pmon.eiwrk028). The file is also located in <proj_path>/log. This file helps you to find the relevant information of the project like start and stop without having to search in the PVSS_II.log file. The stderr+stdout outputs of WCCILpmon are written in to the <proj_path>/log/WCCILpmon_<hostname>.log file.

The size of the PVSS_II.log file as well as pmon.<hostname> log is monitored by the Pmon. The file size can be defined via the config entry maxLogFileSize in the [general] section (default = 10 MB, 0 = unlimited). If the defined size is exceeded the file is renamed PVSS_II.bak.Thereafter a possibly existing shell script (batch file) with the namepostLogFileHandlerand extension.sh (under Linux) or .cmd (under Windows) is executed. This file has to be located in the directory <proj_path>/bin.The name of thePVSS_II.bakfile is passed as parameter.

Also the size of the <Manager><num>.logfiles containing stdout and stderr outputs is monitored. The processing is the same as for the PVSS_II.log- file (this means maxLogFileSize is valid and also an existing postLogFileHandler script is executed).

If the Pmon is started via command line under Windows and at least one command line option is used (e.g. -log +stderr or -dbg 2) the Pmon is started as a normal command line application like under Linux.