What is the best way to shut down Cloverleaf? I know hciss -k h will take down the Host Server. But say you want to take down every process in a particular CL version.
The easy way is to run $HCIROOT/bin/autostop.pl as root. This should be done automatically when the hcihostserver62 service stops.
If you want to do it manually, you have to stop all the processes (hcienginestop -p process1,process2,etc), then stop the host server and lock manager in each site (hcisitectl -K), then stop the host server.
Here is a unix/linux KSH script that will shutdown everything, all processes all sites.
Change the following two lines in the code to your system
export QUOVADX_INSTALL_DIR=/hci/cis5.8
HCIROOT=/hci/cis5.8/integrator
#!/bin/ksh
# History:
# USAGE:ksh z_ShutDown.sh
export QUOVADX_INSTALL_DIR=/hci/cis5.8
HCIROOT=/hci/cis5.8/integrator
serverIni="$HCIROOT/server/server.ini"
wSites=<code>cat $serverIni | grep "environs="</code>
wSites=<code>echo $wSites | cut -c 10-10000</code>
sites=<code>echo $wSites | sed 's/;/ /g'</code>
for sitePath in $sites
do
if [[ -d $sitePath ]]
then
site=<code>echo $sitePath | cut -d'/' -f5</code>
echo $site
date=<code>date</code>
# Set Site
eval <code>$HCIROOT/sbin/hcisetenv -site ksh $site</code>
hcisitectl -S
#Get process names
process_names=<code>cat $HCISITEDIR/NetConfig | grep process | sort -n | awk '{print $2}'</code>
# Loop through the Processes/Threads
#for thread in $thread_names
for process in $process_names
do
hcienginestop -p $process
if [[ $site == "eogh_t" && ( $process != "tst" || $process != "test" ) ]]
then
echo "start Process: $process"
#hcienginerun -p $process
fi
#msg_ct_in=<code>hcimsiutil -dd $thread | grep "Msgs In" | awk '{print $4}'</code>
#site_msg_ct_in=<code>expr $site_msg_ct_in + $msg_ct_in</code>
#sg_ct_out=<code>hcimsiutil -dd $thread | grep "Msgs Out" | awk '{print $4}'</code>
#site_msg_ct_out=<code>expr $site_msg_ct_out + $msg_ct_out</code>
#echo "$site $thread $msg_ct_in $msg_ct_out"
#total_msg_ct_in=<code>expr $total_msg_ct_in + $site_msg_ct_in</code>
#total_msg_ct_out=<code>expr $total_msg_ct_out + $site_msg_ct_out</code>
done
hcisitectl -K
echo "**** SITE $site DONE"
fi
hciss -k h
done
echo "**** ALL DONE"
exit 0
What is a little odd to me is that the vendor did not provide a script or command to bring the entire system down. These suggestions are awesome! Thanks so much.
But why not a script even from Infor that will take down all processes/sites/monitoring daemons and lock manage (everything)?
As others have stated, you can use the autostop.pl but most users of the CL system want to shutdown things in an order that they want. autostop.pl does not allow for that. We have several versions of stop and start scripts. We also run 15 different production CL servers so it all depends on what you want to do.
once you have decided how you want to stop the processes, run hcisitectl -K to stop the lock manager and monitor daemon.
i think this is a great example of why cloverleaf is a great engine. we have flexibility on how to bring it down and how to bring it up, to meet a sites specific needs.