[HPADM] re: ps scripting help

From: Ken Felmly (kfelmly_at_h40a.resva.trw.com)
Date: 05/07/03

  • Next message: Silvio Cesar Lima: "[HPADM] HPUX 11 and nis"
    Date: Wed, 07 May 2003 12:25:21 -0400
    To: "hpux-admin@dutchworks.nl" <hpux-admin@dutchworks.nl>
    
    

    Hi again,
    More information:
    I have a 2-node cluster with 3 SIDs. 2 are 8.0.6 and 1 is 8.1.7. I
    need to run 3 seperate listeners so that when any of the SIDs die, then
    the adoptive node gets the SID with its associated listener. In other
    words, when package 2 fails, I don't want the listener shutdown for the
    other SIDs.

    What I am confused about is that the ps -ef | grep -q returns a 0 for
    running processes that end with the name I am grepping for where the
    processes that have the name within the output (not the last field) it
    returns a 1.

    In essence a server could be running 3 different listeners on different
    services ports and I don't want 1 package to shutdown all of the
    listeners if the other 2 are ok.

    Original post:
    I am trying to run a monitor script that checks for all the Oracle sids
    and the listener.

    MUSTRUN = "ora_pmon ora_smon ora_lgwr LISTENER"
    ALLPROCS=`ps -ef`

    the ps -ef |grep -q " $Process$ returns a 0 for all the "ora_" but the
    LISTENER returns a 1 blowing out the script.

    Near as I can figure, the ps -ef only sees the last entry in the ps -ef
    command (field 9).
    When I put the word "-inherit" (field 10) the script returns a 0 for all
    procs.

    What am I missing?

    Thanks

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Silvio Cesar Lima: "[HPADM] HPUX 11 and nis"

    Relevant Pages

    • [HPADM] Summary: ps scripting help
      ... need to run 3 seperate listeners so that when any of the SIDs die, ... the adoptive node gets the SID with its associated listener. ... running processes that end with the name I am grepping for where the ... I am trying to run a monitor script that checks for all the Oracle sids ...
      (HP-UX-Admin)
    • [HPADM] ps scripting help
      ... I am trying to run a monitor script that checks for all the Oracle sids ... LISTENER returns a 1 blowing out the script. ...
      (HP-UX-Admin)