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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.