cmonitoringmibtuxedo

How to monitor Tuxedo via mib


Currently I am tring to write a program to monitor Tuxedo. from the official documents, I found MIB is suitable for writting program to monitor it. I have read a quite lot of document of here http://docs.oracle.com/cd/E13203_01/tuxedo/tux90/rf5/rf5.htm#998207. Although there are so many instructions of very class, there is no any guide to tell me how to use it from the beginning. I have tried to search on github however unfortuanately there is no any code relating to tuxedo mib. Does any one have some good sample code?

Thanks a lot.


Solution

  • Here a Shell-function that reads the blocktime from Tuxedo:

    get_blocktime() {
    
    TmpErr=/tmp/ud32err_$$
    rtc=0
    
    ud32 -Ctpsysadm <<EOF 2>$TmpErr | grep TA_BLOCKTIME  | cut -f2
    SRVCNM  .TMIB
    TA_CLASS    T_DOMAIN
    TA_OPERATION    GET
    
    EOF
    
    # ud32 has no good error-handling
    if [ -s $TmpErr ]; then
        echo "$PRG: Error calling ud32:"
        cat $TmpErr 1>&2
        rtc=1
    fi
    rm  $TmpErr
    
    exit $rtc
    }