Kill (stop) control manager

Find and share HowTos to various installations / configurations!
18 posts • Page 1 of 2
vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Kill (stop) control manager

Post by vedadramovic »

Hello,

we have a problem with control manager (script). Its http server for some reason stops working, while manager (script) itself is not aware of it. As a result of this, pmon thinks that this manager is running fine.
After a reset of this manager it start working fine for some time.

At this moment I would like to reset this manager by killing (stopping) it, and leting pmon to start it (because it is in start mode - always).

- How to kill (stop) control manager, when I know manager number?

I have tried with:
- stopScript(int index); - nothing happens;
- pmonStopManager(....) - it is throwing exception

Thanks in advance,
Vedad

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Kill (stop) control manager

Post by leoknipp »

Hello,

if you want to stop a manager you can set the datapoint-element _Managers.Exit. You have to write the internal manager-ID on it.
With the CTRL-function convManIdToInt() you can get the manager-ID for the CTRL-manager.

Best Regards
Leopold Knipp
Senior Support Specialist

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: Kill (stop) control manager

Post by vedadramovic »

Thank you very much Leopold.
This works nice.

In order to restart the script I did DPset("_Managers.Refresh", manId).

Best regards,
Vedad Ramovic

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

Re: Kill (stop) control manager

Post by mkoller »

_Managers.Refresh does not do anything with the ctrl manager.
It's Pmon who restarts the Manager, and Pmon has no knowledge about DPs.

mpoint
Posts:49
Joined: Thu Oct 28, 2010 11:28 am

Re: Kill (stop) control manager

Post by mpoint »

Not sure what _Managers.Refresh does (apparently it's something about redundancy) but _Managers.Exit basically works without Pmon. When you write a manager ID to it, the Event manager will send that manager a shutdown message.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Kill (stop) control manager

Post by leoknipp »

Hello,

the dp-element _Managers.Refresh can be used to start a refresh of connect functions for a specific or all managers. Same function is done automatically in redundant systems when the active/passive state changes.
A description for the internal datapoint _Managers can be found in the WinCC OA online help.

Best Regards
Leopold Knipp
Senior Support Specialist

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: Kill (stop) control manager

Post by vedadramovic »

Hello,

I tried to use only _Managers.Exit in non redundant system, and did kill control manager, but control manager was not started again by pmon (which I needed).
So I tried with _Managers.Refresh and it worked.

When I tried this on redundant system it worked without _Managers.Exit.

Thank you very much for your help.
Best regards,
Vedad Ramovic

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Kill (stop) control manager

Post by leoknipp »

Hello,

as written by Martin Koller a restart is done by the process monitor (PMon).
If the automatic restart was not made you have to check the restart settings for the specific manager in the console panel. Also you can have a the pmon. logfile. There you can see when a manager was started and if it was made manually or automatically.

Setting the dp-element _Managers.Refresh will never cause a start of a manager.

Maybe the manager was started by the process monitor at the same time when you have set the dp-element _Managers.Refresh and therefore it looked like the dpSet was the cause for it.

Best Regards
Leopold Knipp
Senior Support Specialist

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: Kill (stop) control manager

Post by vedadramovic »

Thank you all for your help.
Best regards,
Vedad

vedadramovic
Posts:121
Joined: Mon Apr 07, 2014 10:36 am

Re: Kill (stop) control manager

Post by vedadramovic »

Hello,
is there a way to list pmon managers on (passive) redundant scada server from control manager running on active control manager?

For listing of local managers controled by pmon I used pmonGet...() functions.

I need to stop/restart control manager on remote scada server.

Best regards and thanks in advance,
Vedad

18 posts • Page 1 of 2