Is there a command to stop all processes on a site?

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Is there a command to stop all processes on a site?

  • Creator
    Topic
  • #50682
    Robert Denny
    Participant

    Is there a command that stops all processes, or a switch with a command that takes them all down, rather than having to stop each one by one?

Viewing 6 reply threads
  • Author
    Replies
    • #67081

      I wrote a script a long time ago to do this. Probably a better way to do it, but it’s been working fine for years.

      #!/usr/bin/ksh

      LIST=`hciprocstatus | tail –lines=+3 | grep -v dead | awk ‘{print $1}’`

      for x in $LIST
      do

      [code]#!/usr/bin/ksh

      LIST=`hciprocstatus | tail –lines=+3 | grep -v dead | awk ‘{print $1}’`

      for x in $LIST
      do

      -- Max Drown (Infor)

    • #67082
      Robert Denny
      Participant

      Is this script for a unix system?

    • #67083

      Yes.

      -- Max Drown (Infor)

    • #67084
      Joe Halbrook
      Participant

      This is problably obvious and assumed.  I like this script, but I think it should only be used in a production environment after confirming that all inbound data to a site has been stopped, and there are no messages pending in the recovery database.  

      You can also start all processes and threads in a site with one command / script, but that could be dangerous and cost resend time later, as there are many production systems that require ADT from the HIS prior to receiving orders from other external systems, as well as other workflows that might mandate a controlled start of processes and threads.

    • #67085

      From a technical stand point, you should be able to run that script in test or prod whether or not apps are actively sending messages or whether or not message are in the recovery database. When you bring threads back up, the apps will reconnect and begin sending again and messages in the recovery database will be processes as normal.

      From a work flow perspective, there may be situations where you may need to bring down threads at different times.

      -- Max Drown (Infor)

    • #67086
      Joe Halbrook
      Participant

      I would agree, if all your threads were located in only one site.  But, if you have threads in other sites that are sending orders into the engine (which you bring up first) to send to a receiving system, but threads that deliver ADT to that same receiving system are located in another site that you bring up later, you may have problems.

    • #67087
      Earl Coppedge Jr
      Participant

      This might be a little longer, but it stop inbound threads first, then outbound.  Based on how threads are named.  It also does a site clean.

      hciconnstatus | grep ib | awk ‘{print “hcicmd -p”,$1,”-c “”,$2,”pstop””}’ > $HCIROOT/data/tempthreads

      hciprocstatus | awk ‘{print $1}’|sed ‘/Process/d’ |sed ‘/


      /d’ > $HCIROOT/data/processes

      cat $HCIROOT/scripts/stop.processes.now $HCIROOT/data/tempthreads > $HCIROOT/data/tempthreads2

      cp  $HCIROOT/data/tempthreads2 $HCIROOT/scripts/stop.processes.now

      echo “sleep 25” >> $HCIROOT/scripts/stop.processes.now

      awk ‘{print “hcienginestop -p”,$1}’ $HCIROOT/data/processes >> $HCIROOT/scripts/stop.processes.now

      echo “hcisitectl -K -f” >> $HCIROOT/scripts/stop.processes.now

      echo “sleep 15” >> $HCIROOT/scripts/stop.processes.now

      echo “rm $HCISITEDIR/exec/monitorShmemFile” >> $HCIROOT/scripts/stop.processes.now

      echo “rm $HCISITEDIR/exec/databases/vista.taf” >> $HCIROOT/scripts/stop.processes.now

      echo “rm $HCISITEDIR/exec/sem_*” >> $HCIROOT/scripts/stop.processes.now

      echo “hcimsiutil -R” >> $HCIROOT/scripts/stop.processes.now

      echo “hcidbinit -i -f” >> $HCIROOT/scripts/stop.processes.now

      echo “keybuild rlog” >> $HCIROOT/scripts/stop.processes.now

      echo “dchain rlog” >> $HCIROOT/scripts/stop.processes.now

      chmod 744 $HCIROOT/scripts/stop.processes.now

      $HCIROOT/scripts/stop.processes.now

Viewing 6 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10