cancel
Showing results for 
Search instead for 
Did you mean: 

I want to make script that check my ACSLS status

SyedIrfanAhmad
Level 3

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.

9 REPLIES 9

Marianne
Level 6
Partner    VIP    Accredited Certified

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.

Nathan_Kippen
Level 6
Certified

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
 

Nicolai
Moderator
Moderator
Partner    VIP   

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.

SyedIrfanAhmad
Level 3

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.

SyedIrfanAhmad
Level 3

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.

SyedIrfanAhmad
Level 3

I am using master server.

Marianne
Level 6
Partner    VIP    Accredited Certified

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.

Nicolai
Moderator
Moderator
Partner    VIP   

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.

SyedIrfanAhmad
Level 3

Thanks Nicolai. I am going to give you feed back in some days. I appreciate your work.