01-27-2011 05:08 AM
I want to make a script that is going to check my ACSLS status after every hour. If the status of ACSLS is online then the query runs after hour again to check the status, this goes on for ever. If the status of ACSLS goes offline it should send email to my account.
I need some good suggestions for my work.
01-27-2011 05:50 AM
So - you want to check status from NBU master or media server?
Try this:
echo qserver |/usr/openv/volmgr/bin/acstest -r <acsls-server> -s 13741
If the above works, we can tell you how to get it in a 'while' loop with 'sleep' in between.
01-27-2011 06:49 AM
You can also issue cmd_proc commands in a script. You could then parse out what you're looking for and have your acsls server send an e-mail. ..maybe something like:
echo "query server" | cmd_proc -lq
01-27-2011 02:28 PM
You can use this script on the ACSLS server. Add it to the acsss users crontab. Make sure you edit the mail addresses in beginning of the script.
Verify the version of acsls you use with "acsss status" - if the comman return the ACSLS servies running you can use the script, if not it a older version of ACSLS and the script won't work.
01-28-2011 01:45 AM
Thanks Nicolai for helping, but i am using windows server 2003. I have to check its status after every hour; if the status is offline then it send email to the corresponding email addresses.
My idea how to solve the problem is somewhat like i am running .bat file. it invokes the ACSLS after every hour and check the status, if the status is online so we are good but if the status is offline email is generated. After every hour I login again to ACSLS because other peoples are also using it.
01-28-2011 02:02 AM
I am using cluster environment with two master server. I want script that login to ACSLS after every hour to check the status. If the status is offline it generates the email. I can do the email generator but I don’t know how I am going to check the status.
01-28-2011 02:12 AM
I am using master server.
01-28-2011 03:00 AM
Your ACSLS server is running Solaris. Nicolai is suggesting that the monitor script should run on the ACSLS server, not the backup server.
Best suggestion of all.
01-30-2011 05:06 AM
crontab on a solaris/AIX box works like the scheduler on Windows. You can set crontab run run the script every hour(or shorter) to check if there are offline LSM. The script will only send a mail if it finds offline LSM's. I think the script can do what you want.
01-31-2011 01:07 AM
Thanks Nicolai. I am going to give you feed back in some days. I appreciate your work.