Ogg Ops Optimization Script (10)-Query maintenance class--Process detail query

Source: Internet
Author: User

Files:processinfo.sh

path : $HOME/ggscript/ggupload

function: This script is designed to check the detailed source end of all goldengate processes, define files and other information to meet the maintenance configuration.

#!/bin/bashexport 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-$usrcd   $HOME/ggserver (echo info all;echo exit) |. /ggsci|grep -e  "extract| Replicat " |awk  begin {fs="  + "} {print $3} '  >  $HOME/ggscript/ ggupload/tempcd  $HOME/ggscript/gguploadcat temp |tr a-z a-z > temp2sed   ' s/$/.prm/'  temp2 > temp3rm -f temp2i=1num= ' 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/dirprmwhile [  "$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=nonedonesourceip= ' cat  $fname |grep -w  "SourceIP"  |cut -d  ': '  -f 2 '   while [ ${#sourceip} -le 2 ]         do                sourceip=none        donetarget= ' cat  $fname |grep -w   "Target"  |cut -d  ': '  -f 2 '   while [ ${#target} -le 2 ]          do                 target=none        donetargetip= ' cat $ fname|grep -w  "Targetip"  |cut -d  ': '  -f 2 '    while [  ${#targetip} -le 2 ]        do                targetip=none         donedefsfile= ' cat  $fname |grep -w  "Defsfile"  |cut -d  ': '  -f 2 '    while [ ${#defsfile} -le 2 ]         do                defsfile=none&nBsp;       donedefprm= ' cat  $fname |grep -w  "DEFPRM"  |cut  -d  ': '  -f 2 '   while [ ${#defprm} -le 2 ]         do                defprm=none        doneecho -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++));d onecd  $HOME/ggscript/gguploadecho  -n -e&nBSP; " +-------------------------------------------------------------------------------------------------------------- ---------------+\n "


Query results


650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/99/4A/wKiom1lG2L2hDPVVAALcIKur5zM333.jpg-wh_500x0-wm_ 3-wmp_4-s_1423384320.jpg "title=" query results. jpg "alt=" wkiom1lg2l2hdpvvaalcikur5zm333.jpg-wh_50 "/>

This article is from the "Netsman" blog, make sure to keep this source http://netsman.blog.51cto.com/5750076/1939640

Ogg Ops Optimization Script (10)-Query maintenance class--Process detail query

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.