showtask Monitor Script
Posted: Fri Oct 25, 2013 3:02 pm
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]
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]