Starting and stopping Manager via CTRL-Script

Find and share HowTos to various installations / configurations!
Search

Post Reply
4 posts • Page 1 of 1
aleksandar.postolov
Posts: 19
Joined: Thu Sep 05, 2013 3:51 pm

Starting and stopping Manager via CTRL-Script

Post by aleksandar.postolov »

Hi everyone

How can I start and stop a Manager via CTRL-script? Is there such a function?

I tried it with a tcpWrite command (MGRLIST) but I recive "ERROR no Auth : unknown authorisation".
I wrote the command with the root-user.

Best regards
Aleks

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Starting and stopping Manager via CTRL-Script

Post by leoknipp »

Please have a look at the following thread
viewtopic.php?f=16&t=10343&p=964789&hil ... er#p964785

Best Regards
Leopold Knipp
Senior Support Specialist

aleksandar.postolov
Posts: 19
Joined: Thu Sep 05, 2013 3:51 pm

Re: Starting and stopping Manager via CTRL-Script

Post by aleksandar.postolov »

Thank you very much - just saw this a couble of hours ago.
But this isn't working neither. I try to start and stop a OPC-Driver

_Managers(_2).Exit doesn't work. I write the Manager PID and nothing happens.
Logviewer: WCCILevent (0), 2019.05.28 11:08:57.659, PARAM,INFO, 0, , Terminate manager (SYS: 0 None -num 2 CONN: 2)


If I use the commands from the pmon.ctl - there is a warning in the logviewer - variable not defined: gTcpFileDescriptor2

I overwrote the pmon.ctl and defined the variable. But the next warning is:

Line: 185: tcpWrite: Socket Nummer (0) illegal oder Socket nicht geöffnet.

Best way to do is
system( "WCCILpmon.exe -command SINGLE_MGR:START 13" );

this works

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Starting and stopping Manager via CTRL-Script

Post by leoknipp »

Possibly the manager ID you have written to _Managers(_2).Exit was not correct and therefore it did not work.
The manager ID you get by using the CTRL function convManIdToInt().

Please take into account that the functions defined in pmon.ctl are designed for internal use, therefore no documentation is available.
Also when using these functions some prerequisites (.e.g global variables) must by fulfilled, otherwise the functions will not work.

Best Regards
Leopold Knipp
Senior Support Specialist

Post Reply
4 posts • Page 1 of 1