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
  • #50682
    Robert Denny

    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
    • #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.


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

      for x in $LIST


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

      for x in $LIST

      -- Max Drown (Infor)

    • #67082
      Robert Denny

      Is this script for a unix system?

    • #67083


      -- Max Drown (Infor)

    • #67084
      Joe Halbrook

      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

      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

      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/ $HCIROOT/data/tempthreads > $HCIROOT/data/tempthreads2

      cp  $HCIROOT/data/tempthreads2 $HCIROOT/scripts/

      echo “sleep 25” >> $HCIROOT/scripts/

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

      echo “hcisitectl -K -f” >> $HCIROOT/scripts/

      echo “sleep 15” >> $HCIROOT/scripts/

      echo “rm $HCISITEDIR/exec/monitorShmemFile” >> $HCIROOT/scripts/

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

      echo “rm $HCISITEDIR/exec/sem_*” >> $HCIROOT/scripts/

      echo “hcimsiutil -R” >> $HCIROOT/scripts/

      echo “hcidbinit -i -f” >> $HCIROOT/scripts/

      echo “keybuild rlog” >> $HCIROOT/scripts/

      echo “dchain rlog” >> $HCIROOT/scripts/

      chmod 744 $HCIROOT/scripts/


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

Forum Statistics

Registered Users
Topic Tags