Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433

    Unanswered: How to Determine if Instance is Running !!

    i want to create a taskCenter Script which will mail me whenever any server instance is down.
    i was thinking of using

    select db2_status from table(snapshot_dbm(0)) as dbm

    However the problem is it needs to be connected to a DB to run this command
    Is there any way through which i can get the status without connecting to a DB .

    --Rahul Singh

  2. #2
    Join Date
    Jun 2006
    Posts
    471

    down

    we check the instance up/down from db2diag.log and db2diag command
    each 15min we start db2diag -t last_timestamp -g ..
    with filter on ADM...W message indicating instance has stopped - db2 instance has been started
    we save last run timestamp and use this as start for next check
    output if any is mailed
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Unix

    Another way is to do a ps -ef | grep <instance name> and see if the db2sysc process are running.

    For e.g.

    $ ps -ef | grep dumfsa1
    dumfsa1 299058 1110180 0 11:30:51 - 0:00 db2tcpcm 0
    dumfsa1 360624 1110180 0 11:30:51 - 0:00 db2tcpcm 0
    dumfsa1 475162 839726 0 11:31:10 - 0:15 db2agent (idle) 0
    dumfsa1 626862 995474 0 11:30:52 - 0:00 db2spmlw 0
    dumfsa1 700500 995474 0 11:31:10 - 0:00 db2cart 0
    dumfsa1 733378 1110180 0 11:30:52 - 0:00 db2spmrsy 0
    dumfsa1 741606 356554 3 0:00 <defunct>
    dumfsa1 757888 1110180 0 11:30:51 - 0:00 db2tcpcm 0
    makern 823454 614600 0 14:57:17 pts/5 0:00 grep dumfsa1
    dumfsa1 839726 1110180 0 11:30:51 - 0:00 db2ipccm 0
    dumfsa1 995474 1110180 0 11:30:51 - 0:00 db2gds 0
    dumfsa1 1065138 995474 0 11:30:52 - 0:00 db2srvlst 0
    dumfsa1 1073332 1110180 0 11:30:52 - 0:00 db2resync 0
    dumfsa1 1093814 512146 0 14:01:17 pts/6 0:00 -ksh
    dumfsa1 1110180 815340 0 11:30:50 - 0:00 db2sysc 0
    dumfsa1 1175686 299058 0 11:35:50 - 0:00 db2agent (idle) 0
    $
    HTH

    Nitin

    Ask the experienced rather than the learned

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •