[mcbadm@ibss3-bce-mpp3-5 bomc_kfs]$ pwd
/home/mcbadm/bomc_kfs
[mcbadm@ibss3-bce-mpp3-5 bomc_kfs]$ more kfs_heartbeat.sh
#/bin/bash
logdir="/home/mcbadm/bomc_kfs";
cd ${logdir};
while true
do
start_time=`date +%Y%m%d%H%M%S`;
echo "start time: ${start_time}" >> kfs_heartbeat.log;
#cds_135,cds_136,cds_137,cds_138,cds_142,cds_143
fsrepctl -service cds_135 heartbeat;
fsrepctl -service cds_136 heartbeat;
fsrepctl -service cds_137 heartbeat;
fsrepctl -service cds_138 heartbeat;
fsrepctl -service cds_142 heartbeat;
fsrepctl -service cds_143 heartbeat;
end_time=`date +%Y%m%d%H%M%S`;
echo "end time: ${end_time}" >> kfs_heartbeat.log ;
sleep 3600
done
[mcbadm@ibss3-bce-mpp3-5 bomc_kfs]$
启动
nohup sh /home/mcbadm/bomc_kfs/kfs_heartbeat.sh >> 1.log 2>&1 &