Stop and Start Prozesses in SSH-Console (and read Status)

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
scripto
Posts:8
Joined: Fri Sep 21, 2012 3:38 pm

Stop and Start Prozesses in SSH-Console (and read Status)

Post by scripto »

Hello,

The Administration of WinCC OA on the Server is performed in the Standardversion via the graphical console (we use version 3.14).
Is it also possible to query the status of the processes of Wincc OA (Event-, DB-, Archive- ,Controlmanager etc) in an SSH Console (without GUI) and stop and start processes there?
Best Regards

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Stop and Start Prozesses in SSH-Console (and read Status)

Post by mkoller »

you can even connect to the pmon from another computer using a webbrowser, since the pmon can talk the HTTP protocol.
Pmon generates an HTML page where you can see the status and you can start/stop managers/the project.
However you must allow pmon to bind the socket not only to localhost if you's like to use this (config file, localAddress entry).

If you's rather like to query information directly from pmon when you're logged into the machine via SSH, you can then locally connect to
pmon's port via telnet and communicate the simple text based, line oriented protocol with it.
Or you can simply use the "killdbg" tool from the install/bin dir and let pmon create a report of its current state, e.g.
/bin/killdbg -report all

mkerk
Posts:75
Joined: Wed Oct 20, 2010 12:25 pm

Re: Stop and Start Prozesses in SSH-Console (and read Status)

Post by mkerk »

Hello,
The WinCCILpmon manager (process monitor = pmon) opens a TCP server socket (default port number is 4999). via this port the pmon can be queried and controlled. 3 types of protocols are also supported by the pmon : HTTP, Pmon specific protocol and SNMP.
Via the pmon specific protocol the whole pmonTable (progs-file of the project) can be queried and also changed. specific commands to start and stop the whole project and also any manager can be sent. For detailed information about the pmon specific protocol and commands, please refer to the WinCC OA documentation ( chapter Projekt administration --> Process monitor).

Please note that due to security reasons the default settings for the Pmon limits the access (HTTP, TCP) only to the local machine!
To re-enable the access from any computer, you need to set the following config entry:
[pmon] localAddress = "" .
If access from any computer is enabled you are still able to limit the access on IP basis with the config entries ip_allow and ip_deny.

BR,
Mousser

schneebergera
Posts:89
Joined: Sun Apr 03, 2016 5:52 pm

Re: Stop and Start Prozesses in SSH-Console (and read Status)

Post by schneebergera »

Hello,

please refer also to oa_help [Details on the Pmon]
--commands for the specific Pmon protocol;
This commands allows to handle or monitor processes of a project (ssh session)

./WCCILpmon -proj "proj-name" -command START_ALL
Starts the project (only allowed in the WAIT_MODE mode)

./WCCILpmon -proj "proj-name" -command STOP_ALL
Stops the project (beginning from the last manager until the first manager).

more details prompted by following commands:
-help (WCCILpmon understands the following arguments)
-helpcommand (Commands understood by option -command)


On the other hand it is possible to start/stop processes via HTTP (as already described)
take care about config entries - for example:
---
[pmon]
#localAddress = "XXX.XXX.XXX.XXX"
localAddress = ""

# deny access for everyone
ip_deny = "*"

# allow access for the local computer
ip_allow = "127.0.0.1"
ip_allow = "::ffff:127.0.0.1"
ip_allow = "::1"

# allow access for a specific IP-address
ip_allow = "XXX.XXX.XXX.XXX"
ip_allow = "::ffff:XXX.XXX.XXX.XXX"
---

with best regards,
Andreas

4 posts • Page 1 of 1