WinCC OA as Linux Service

You can configure WinCC OA as service and start a project also when a user is not logged in (see also WinCC OA as service) under Linux just as under Windows. The PMON with the defined project will be started when the system is started.

If WinCC OA is used as service and SNMP is used, the user account that is used has to possess write rights to the directories <proj_path>/log and <proj_path>/db.

Under Linux, there are multiple possibilities to configure WinCC OA as service. We recommended to use the systemd service file.

systemd Service File

During the rpm installation of WinCC OA the file /etc/systemd/system/winccoa@.service is created. This file is only used by the following systemctl commands (and systemd). The projectName to be used is simply given as an "instance" name to it.

There is usually no need for a system integrator to change the file.

Activate Service

When a system integrator now wants to define a specific (already registered) WinCC OA project to be automatically started on system boot, he simply issues the following command:

systemctl enable winccoa@projectName

Deactivate Service

To disable such a configuration again, one issues:

systemctl disable winccoa@projectName

Manually Start Project

To start such a project manually:

systemctl start winccoa@projectName

Manually Stop Project

To stop such a project manually:

systemctl stop winccoa@projectName

Request Status

To request current status:

systemctl status winccoa@projectName

System Log

To view the systems log (journal):

journalctl

As seen above, the winccoa@.service file is not manually changed, but systemd manages to create symbolic links to that file which include the projectName.

Run Project for Specific User

Often it is desired to run a project under a specific user. To do this, the system integrator needs to modify the service file manually and uncomment the

#User=

line to set the desired user, to e.g.

User=winccoa

Definition of the project that should be started

After setting the service the file /etc/winccoa.conf has to be edited and the entry "PVSS_II = ..." has to be adjusted for the desired project.

Restart the system (or change the run level) and check after the login whether the defined project was started during the boot process. All WinCC OA processes are started as "root".

Before you restart the computer, check whether all UI managers of the project that should be started, are provided with the start type "manual". If the managers do not have this start type, adjust the start type of the UIs in the WinCC OA console (see Administration of managers). The start type "always" starts the managers always. In order to start a UI automatically, specify the start option -display :0.0 for the user interface.

Project as a service with RDB

Note: Set the required environment variables with ldconfig, see chapter Set necessary environment variables for the libraries with ldconfig.

To run a WinCC OA Project as a service with RDB under Linux you have to define the following variables in the file /etc/systemd/system/winccoa@service

[Unit]
Description=WinCC OA project '%i'

[Service]
ExecStart=/opt/WinCC_OA/3.18/bin/WCCILpmon -proj %i
ExecStop=/opt/WinCC_OA/3.18/bin/WCCILpmon -proj %i -stopWait
Environment="ORACLE_HOME=/disc/oracle/product/19.3.0.0/Db_1"

[Install]
WantedBy=multi-user.target