Page 1 of 1

showtask Monitor Script

Posted: Fri Oct 25, 2013 3:02 pm
by chanri
Hello Gurus,

I have created some Physical Copies of 5 VV and I resync them daily and then updatevv some snapshots of the Physical Copies. Sometimes the Physical copies resync may take about 25 minutes to complete, but that depends how much data has been changed during the day. Some other time the resync take less time. So, I created a script in HP-UX that was supposed to monitor the resync task and when no more task are running , i want it to print out a message to the screen indicating me to check the resync and it is ok to start the updatevv.

When I execute the script it stays in a loop but does not finish when the task do. It keeps on going until I kill it. Can any one detect what is wrong in the following script:

#!/sbin/sh
while [ "`ssh 3paruser@INSERV \"showtask -active -type phys_copy_resync\"`" != "No tasks. " ]; do
echo "Waiting 30 sec for Phys Copies Resync to finish."
sleep 30
done

echo "Resync Phys Copies has finish"
echo "OK to Refresh Snapshots"

Any help will be appreciated

Thanks

Chan

[size=50][size=85][/size][/size]

Re: showtask Monitor Script

Posted: Wed Nov 06, 2013 3:55 pm
by zQUEz
i'm currently at a job that doesn't have 3PAR so I can't test my theory, however, you know you have a {space} between "tasks" and the closing quotes right? Is that how it is displayed? I don't think there is a space, and if there isn't, it would cause the script to remain in a loop.

I start back at a company with 3PAR in 2 weeks ... YAY ... very happy. :-)