Tag Archives: manage

Creating a shell script to manage the IS service

Hello there,

Today a quick tip that can help to manage the IS if it is down.

To do that, just create a new file .sh with these lines:

output=`/opt/MicroStrategy/bin/mstrctl -s IntelligenceServer gs` #use your path

if [ `echo $output | grep -c “run” ` -gt 0 ]; then check=1; else check=0; fi
if [ $check -eq 0 ]; then
if [ `echo $output | grep -c “stopped” ` -gt 0 ] || [ `echo $output | grep -c “terminated” ` -gt 0 ]; then
/opt/MicroStrategy/bin/mstrctl -s IntelligenceServer start #use your path
fi
fi

Save the file and make sure to change it to an executable file:

chmod +x filename.sh

Where filename is the name that you used above.

Now, make sure to schedule it using crontab or other scheduler tool.

Hope it helps

God bless you