ITPub博客

首页 > IT基础架构 > 网络安全 > 做DD迁移时候的监控脚本,很有用的哟。

做DD迁移时候的监控脚本,很有用的哟。

原创 网络安全 作者:sonsunny 时间:2008-08-20 10:23:05 0 删除 编辑

linux 环境下
#!/bin/bash
while true
do
DDRUN=$(ps -ef | grep dd | grep -v grep | wc -l)

[@more@]if [ $DDRUN = 0 ] ; then

echo "--------------------------DD IS FINISHED OR NO DD---------------"

exit

else


echo "------------------------DD IS RUNING-----------------------------"
ps -ef | grep dd |grep if | grep -v grep | awk '{print $8,$9,"=",$10,$11,"=",$12,$13,$14}'
date

fi
sleep 10
done


HP unix环境下

#!/sbin/sh
while true
do
DDRUN=$(ps -ef | grep dd | grep -v grep | wc -l)
if [ $DDRUN = 0 ] ; then

echo "--------------------------DD Finished Or No DD Proccess---------------"

exit

else


echo "------------------------DD IS RUNING-----------------------------"
ps -ef | grep dd |grep if | grep -v grep | awk '{print $8,$9,$10,$11}'
date

fi
sleep 10
done

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15192459/viewspace-1009197/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2008-08-25

  • 博文量
    18
  • 访问量
    25406