您好,登錄后才能下訂單哦!
文件:processinfo.sh
路徑:$HOME/ggscript/ggupload
功能:該腳本為滿足維護配置時檢查所有goldengate進程的詳細源端目標(biāo)端,定義文件等信息而設(shè)計
如果未按照腳本部署準(zhǔn)備進行內(nèi)容注釋,輸出結(jié)果會為空
如果有其他注釋信息,輸出結(jié)果會被干擾
#!/bin/bash export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" echo "This sciprt is write by RenYi" hn=`echo $HOSTNAME` usr=`echo $USER` echo $hn-$usr cd $HOME/ggserver (echo info all;echo exit)|./ggsci|grep -E "EXTRACT|REPLICAT" |awk 'BEGIN {FS=" +"} {print $3}' > $HOME/ggscript/ggupload/temp cd $HOME/ggscript/ggupload cat temp |tr A-Z a-z > temp2 sed 's/$/.prm/' temp2 > temp3 rm -f temp2 i=1 num=`sed -n '$=' temp3` echo -n -e "+-----------------------------------------------------------------------------------------------------------------------------+\n" printf "%-1s %-15s %-1s %-15s %-1s %-16s %-1s %-12s %-1s %-16s %-1s %-15s %-1s %-16s %-1s\n" \| process \| source \| sourceip \| target \| targetip \| defsfile \| defprm \| cd $HOME/ggserver/dirprm while [ "$i" -le "$num" ] do fname=`sed -n $i'p' $HOME/ggscript/ggupload/temp3` pname=`sed -n $i'p' $HOME/ggscript/ggupload/temp` source=`cat $fname|grep -w "source" |cut -d ':' -f 2` while [ ${#source} -le 2 ] do source=none done sourceip=`cat $fname|grep -w "sourceIP" |cut -d ':' -f 2` while [ ${#sourceip} -le 2 ] do sourceip=none done target=`cat $fname|grep -w "target" |cut -d ':' -f 2` while [ ${#target} -le 2 ] do target=none done targetip=`cat $fname|grep -w "targetIP" |cut -d ':' -f 2` while [ ${#targetip} -le 2 ] do targetip=none done defsfile=`cat $fname|grep -w "defsfile" |cut -d ':' -f 2` while [ ${#defsfile} -le 2 ] do defsfile=none done defprm=`cat $fname|grep -w "defprm" |cut -d ':' -f 2` while [ ${#defprm} -le 2 ] do defprm=none done echo -n -e "+-----------------------------------------------------------------------------------------------------------------------------+\n" printf "%-1s %-15s %-1s %-15s %-1s %-16s %-1s %-12s %-1s %-16s %-1s %-15s %-1s %-16s %-1s\n" \| $pname \| $source \| $sourceip \| $target \| $targetip \| $defsfile \| $defprm \| ((i++)); done cd $HOME/ggscript/ggupload echo -n -e "+-----------------------------------------------------------------------------------------------------------------------------+\n"
查詢結(jié)果
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。