Vinod Subramaniam

rpostat in the style of iostat on UNIX

Discussion created by Vinod Subramaniam Employee on May 19, 2014
Latest reply on May 19, 2014 by Michelle Ann Hak

rhel6-2:/root # ./rpostat.sh

USAGE : ./rpostat.sh <HORCMINST> <HORCMGROUP>


rhel6-2:/root # ./rpostat.sh 50 HCS-DATABASE

START_TIME          HORCM_GROUP     Q-MARKER SYNC_SECONDS

   09:52:9         HCS-DATABASE 0x000005177e     1

  09:52:29         HCS-DATABASE 0x0000051784    62

  09:52:30         HCS-DATABASE 0x0000051785     1

  09:52:49         HCS-DATABASE 0x0000051786    61

  09:52:69         HCS-DATABASE 0x00000517a8    64

  09:53:10         HCS-DATABASE 0x00000517b1     1

  09:53:34         HCS-DATABASE 0x00000517b4    55

  09:53:55         HCS-DATABASE 0x00000517bb    63

  09:53:55         HCS-DATABASE 0x00000517c3     1

  09:54:25         HCS-DATABASE 0x00000517c6    60

  09:54:25         HCS-DATABASE 0x00000517d6     1

  09:54:50         HCS-DATABASE 0x00000517d9    58

  09:54:50         HCS-DATABASE 0x00000517fb     1

  09:54:75         HCS-DATABASE 0x000005180b    65

  09:55:35         HCS-DATABASE 0x000005182a    64

  09:55:55         HCS-DATABASE 0x0000051840    63

  09:55:56         HCS-DATABASE 0x0000051841     1

  09:56:20         HCS-DATABASE 0x0000051843    62

  09:56:21         HCS-DATABASE 0x0000051844     1

  09:56:41         HCS-DATABASE 0x0000051849    60

  09:56:41         HCS-DATABASE 0x0000051854     1

  09:57:31         HCS-DATABASE 0x000005185a    62

  09:57:31         HCS-DATABASE 0x0000051861     1

  09:57:56         HCS-DATABASE 0x0000051867    60

  09:57:56         HCS-DATABASE 0x0000051881     1

  09:58:21         HCS-DATABASE 0x000005188b    64

  09:58:22         HCS-DATABASE 0x000005188f     1

 

 

#!/bin/bash

###################################### SCRIPT TO REPORT ON RPO VALUES FOR A HORCMGROUP ############################

###################################### AUTHOR : VINOD SUBRAMANIAM #################################################

###################################### EMAIL : vinod.subramaniam@hds.co ###########################################

###################################### USAGE : ./rpostat.sh <HORCMINST> <HORCMGROUP> ##############################

 

if [ $# -ne 2 ]

then

        echo "USAGE : ./rpostat.sh <HORCMINST> <HORCMGROUP>"

        exit 1

fi

 

export HORCMINST=$1

 

printf "%10s %20s %12s %5s\n" "START_TIME" "HORCM_GROUP" "Q-MARKER" "SYNC_SECONDS"

 

O_QMARKER="0x0000000000"

 

while true

do

        QMARKER=$(printf "%010x" "0x"$(pairdisplay -g $2 -v jnl -fx | grep PJNN | tr -s " " | cut -d" " -f7 | tr -d "\n" | tr -d " "))

        if [ "$QMARKER" != "$O_QMARKER" ]

        then

        HOUR=$(date "+%H")

        MINUTE=$(date "+%M")

        SECONDS=$(date "+%S")

 

        ELAPSECONDS=1

 

        pairsyncwait -g $2 -m $QMARKER -t 1 2> /dev/null 1> /dev/null

 

        while [ $? -ne 0 ]

        do

                let ELAPSECONDS=ELAPSECONDS+1

                pairsyncwait -g $2 -m $QMARKER -t 1  2> /dev/null 1> /dev/null

        done

 

        printf "%10s %20s 0x%010x %5d\n" $HOUR":"$MINUTE":"$SECONDS $2 "0x"$QMARKER $ELAPSECONDS

        export O_QMARKER=$QMARKER

        fi

 

done

Outcomes