debug tuxedo services using dbx

  rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml">

1. find out the server process id.

v490i1:/opt/app/tuxapp/tuxopq$ pgrep opfqdb

23859

23889

23890

We have 3 identical servers, the server have 2 copies as its backup.

 

2. find out which of the 3 servers will be the active process(normally the median pid number, it’s up to the internal load balance algorithm in Tuxedo), and attach dbx to it:

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) attach 23889

Attached to process 23889

stopped in __systemcall at 0xfe120080

0xfe120080: __systemcall+0x0030:        ta      0x8

In fact, there is a way to predict which will be the active process to handle the next request rather than guessing.

(1) send a request to the service

(2) observe the output of ‘psr’ in tmadmin, see which opfqdb process handles this request. This server process is the one we should attach dbx to.

another way is to modify your UBB and boot only one process to debug.

 

3. set the break point to get control on the server:

 (/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) file opfqpc.c

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) stop at 703

(2) stop at "opfqpc.c":703

 

4. send a request to the server. It will be stopped when it reaches the breakpoint. You have got complete control over the server now!

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) cont     

stopped in OPFQ_ctl_DBselect at line 703 in file "opfqpc.c"

  703       strcpy(opfq->sqlstep,"PREPARE SELECT OPFQ_QUE_CTL");      

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print opfq

opfq = 0xffbf4218

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print *opfq

*opfq = {

    itm_nbr       = 0.0

    city_cd       = "BJS"

    offc_nbr      = 187

    rsn_cd        = "RE"

    ori_rsn_cd    = "RE"

    rsn_cd_nbr    = 28

que_desc =  "PSGR REBOOK"

    offc_count    = 0

    agt_nbr       = 0

    que_agt_nbr   = 8888

    que_pid       = 30426

    que_airl      = "1E"

    row           = 0

    que_offc_cd   = "TV"

    que_crt_dt_mf = "14SEP08094523"

    que_cont_typ  = 8

    que_itm_typ   = 1

    que_itm_count = 0

    txn_id        = "QE"

    run_id        = "*3K$YC"

    pnr_crt_dt    = ""

    que_cont      = "aaaaaaaaaaaaaaa/015FROM AGENT 8888  PID30426   PEK099  1559  14/09/08        "

    func          = ""

    que_ctl_count = 0

    que_ctl_nbr   = 0.0

    sqlstep       = 0x2630b8 ""

    sqlcode       = 0

    sqllog        = ""

    sqlerror      = ""

}

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) next     

stopped in OPFQ_ctl_DBselect at line 704 in file "opfqpc.c"

  704       opfq->sqlcode = sqlca.sqlcode;

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) next

stopped in OPFQ_ctl_DBselect at line 705 in file "opfqpc.c"

  705       CHECKSQL0OPFQ(return);  

(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print *opfq

*opfq = {

    itm_nbr       = 0.0

    city_cd       = "BJS"

    offc_nbr      = 187

    rsn_cd        = "RE"

    ori_rsn_cd    = "RE"

    rsn_cd_nbr    = 28

que_desc      = "PSGR REBOOK "                                                                   

    offc_count    = 0

    agt_nbr       = 0

    que_agt_nbr   = 8888

    que_pid       = 30426

    que_airl      = "1E"

    row           = 0

    que_offc_cd   = "TV"

    que_crt_dt_mf = "14SEP08094523"

    que_cont_typ  = 8

    que_itm_typ   = 1

    que_itm_count = 0

    txn_id        = "QE"

    run_id        = "*3K$YC"

    pnr_crt_dt    = ""

    que_cont      = "aaaaaaaaaaaaaaa/015FROM AGENT 8888  PID30426   PEK099  1559  14/09/08        "

    func          = ""

    que_ctl_count = 0

    que_ctl_nbr   = 0.0

    sqlstep       = 0x2630b8 "PREPARE SELECT OPFQ_QUE_CTL"

    sqlcode       = 0

    sqllog        = ""

    sqlerror      = ""

}

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值