Author |
Message
|
zaklum |
Posted: Mon May 09, 2005 12:20 pm Post subject: [SOLVED]writting a shell script to stop/start workflow |
|
|
Voyager
Joined: 17 Mar 2005 Posts: 96 Location: Boca Raton
|
Hi guys,
I'm trying to write a simple shell script that will stop and start my workflow. This implies for me to start the queue manager and the Trigger monitor. I am applying step by step as I do manually, everything seems to be normal, but when I run the fmcautil it hangs as usual. I have to do CNT + C to get out of it:
HERE IS THE SCRIPT:
/tmp #> cat stop_start_Workflow.sh
#!/bin/ksh
strmqm FMCQM
runmqtrm -m FMCQM -q FMCTRIGGER &
fmcamain -y FMC &
fmcautil -y FMC -uADMIN -ppassword -f
HERE IS MY OUTPUT:
Waiting for a trigger message
- FMC16301I UserID 'ADMIN' connected to system 'FMCSYS'.
- FMC16301I UserID 'ADMIN' connected to system 'FMCSYS'.
= FMC16110I Receive thread for userID 'ADMIN' at system 'FMCSYS' started.
= FMC16110I Receive thread for userID 'ADMIN' at system 'FMCSYS' started.
FMC15010I Main Menu:
s ... System Commands Menu
m ... Select Server Menu
e ... Errorlog Commands Menu
l ... Systemlog Commands Menu
u ... User Commands Menu
x ... Exit Main Menu
FMC10200I Execution server for system FMCSYS started.
FMC10200I Execution server for system FMCSYS started.
> 05/09/05 16:08:16 FMCSYS: FMC10200I Execution server for system FMCSYS started.
FMC10200I Execution server for system FMCSYS started.
> 05/09/05 16:08:16 FMCSYS: FMC10500I Execution server instance started.
> 05/09/05 16:08:21 FMCSYS: FMC10000I System startup complete. System FMCSYS in system group FMCGRP is now running.
//here is the part where it hangs and I have to press CNTRL + C to exit.
is this normal?
after running the fmcautil -y userid -uuser -ppassword, do i need to select anything? I see that workflow starts withoout me selecting anything.
Regards, |
|
Back to top |
|
 |
Ratan |
Posted: Mon May 09, 2005 12:36 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
if you get this menu:
s ... System Commands Menu
m ... Select Server Menu
e ... Errorlog Commands Menu
l ... Systemlog Commands Menu
u ... User Commands Menu
x ... Exit Main Menu
it means WF is running and your admin utility connected to WF Server.
When you say "hanges" do mean you are not getting anymore output statements or are you unable to select any of the options? _________________ -Ratan |
|
Back to top |
|
 |
vennela |
Posted: Mon May 09, 2005 12:53 pm Post subject: Re: writting a shell script to stop/start workflow |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
zaklum wrote: |
/tmp #> cat stop_start_Workflow.sh
#!/bin/ksh
strmqm FMCQM
runmqtrm -m FMCQM -q FMCTRIGGER &
fmcamain -y FMC &
fmcautil -y FMC -uADMIN -ppassword -f
|
Why do you have this line
Code: |
fmcautil -y FMC -uADMIN -ppassword -f |
If I ever write a startup script I wouldn't have this line in the script.
On the other hand, if you want to automate things:
fmcautil -y FMC -uADMIN -ppassword -f < fmcautil.input
where the file fmcautil.input would have the following
Moreover, you should nohup both the trigger monitor and fmcamain |
|
Back to top |
|
 |
zaklum |
Posted: Mon May 09, 2005 1:08 pm Post subject: |
|
|
Voyager
Joined: 17 Mar 2005 Posts: 96 Location: Boca Raton
|
Ok,
Do I really need fmcautil to start workflow? isn't enought to do the following:
1. start queue manager
2. start trigger monitor
3. start administration server fmcamain
are these the only 3 steps required for workflow to do its operations of transferring FDL?
now when I shut down workflow then I need to run fmcautil, right?
thanks, |
|
Back to top |
|
 |
Ratan |
Posted: Mon May 09, 2005 1:16 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
you dont need to start your WF Server to import FDLs.
Fmcautil has nothing to do with starting WF Server.
starting fmcamain is enough to start WF Server (QM and trigger monitor should be running). _________________ -Ratan |
|
Back to top |
|
 |
zaklum |
Posted: Mon May 09, 2005 1:31 pm Post subject: |
|
|
Voyager
Joined: 17 Mar 2005 Posts: 96 Location: Boca Raton
|
great!!!
Now, how about to shut down fmcamain? do I need to run fmcautil or can I just do a kill -9 on fmcamain process?
thanks guys,
zaklum |
|
Back to top |
|
 |
Ratan |
Posted: Mon May 09, 2005 1:35 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
To shutdown WF Server, just killing fmcamain is not enough. you have to kill fmcemain, fmcsmain and fmccmain (if they are running). Best way is to use fmcautil to stop WF server (options s and d). _________________ -Ratan |
|
Back to top |
|
 |
karthik |
Posted: Mon May 09, 2005 1:38 pm Post subject: |
|
|
 Centurion
Joined: 17 Oct 2003 Posts: 114
|
Easiest way to do it
echo sdxx | fmcautil -uadmin -ppassword -yCONFID -f
Thanks
Karthik |
|
Back to top |
|
 |
vennela |
Posted: Mon May 09, 2005 1:47 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
do I need to run fmcautil or can I just do a kill -9 on fmcamain process? |
Killing is not a good idea. Use fmcautil in one of the above two methods. |
|
Back to top |
|
 |
zaklum |
Posted: Tue May 10, 2005 5:41 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2005 Posts: 96 Location: Boca Raton
|
Hi guys,
Everything looks beautifu now, the only minor problem that I'm getting is the hanging when I do the starting part. Here is what I mean:
Waiting for a trigger message
FMC10200I Execution server for system FMCSYS started.
FMC10200I Execution server for system FMCSYS started.
FMC10200I Execution server for system FMCSYS started.
//right here it hangs and I have to hit enter to exit; I don't want this to be like this, since I might want to put this in a cron.
Here is the code:
echo "Choose a function from the menu: \n"
echo "1 - Start Workflow System\n"
echo "2 - Stop Workflow System\n"
read FUNCTION
print $FUNCTION
if [ "$FUNCTION" -eq 1 ]
then
print "Starting Workflow System ...Please wait!\n"
print "Starting the Queue Manager.....\n"
strmqm FMCQM | grep started
print "Starting the FMCTRIGGER.....\n"
runmqtrm -m FMCQM -q FMCTRIGGER &
print "Starting the Administration Server.....\n"
fmcamain -y FMC &
exit //this exit statement doesn't work
elif [ "$FUNCTION" -eq 2 ]
then
print "Workflow Shutting Down, please wait ...\n"
echo sdxx | fmcautil -uADMIN -ppassword -yFMC -f
fi |
|
Back to top |
|
 |
zaklum |
Posted: Tue May 10, 2005 6:57 am Post subject: |
|
|
Voyager
Joined: 17 Mar 2005 Posts: 96 Location: Boca Raton
|
Ok guys,
This problem is solved. Thank you very much for all your help. |
|
Back to top |
|
 |
|