Alert Configurator – Cycle the Thread

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Alert Configurator – Cycle the Thread

  • Creator
    Topic
  • #51545
    Gordon Koch
    Participant

      I have seen previous posts regarding the auto cycling of a thread using the Alert functionality, but I am hoping to get more recent feedback. We are running CL 5.6 on a Linux platform, and I would like to stop/start a thread via an alert. I assume one uses the hcicmd’s (pstop and pstart) in an exec action. Is this done in one or two different alerts? How do you place a small delay between the stop and start commands? Anyone doing this in 5.6?

      Thanks.

    Viewing 8 reply threads
    • Author
      Replies
      • #70721
        Mason Miller
        Participant

          I setup an alert to exec a this .bat file and it restarts the thread for me I am on windows 2003 qdx5.5 not sure if it will work on linix or not

          Code:

          call setroot d:quovadxqdx5.5integrator
          call setsite smmccltest
          call showroot

          hcicmd -p scc -c “recv_from_scc pstop” & hcicmd -p scc -c “recv_from_scc pstart”

        • #70722
          David Harrison
          Participant

            Cloverleaf 5.6 on Solaris 10

            I use an alert to restart a thread that stops now and again. This is how the alert is set up

            Code:

            /export/quovadx/qdx5.6/integrator/usercmds/start.clip


            This is the start.clip script file

            Code:

            #!/bin/ksh
            #
            # /export/quovadx/qdx5.6/integrator/usercmds/start.clip
            #
            # Script to restart thread that has stopped
            #
            export SCRIPTDIR=/export/quovadx/qdx5.6/integrator/usercmds
            sleep 300
            mailx -s “Cloverleaf Alert” dave.harrison@fph-tr.nhs.uk < $SCRIPTDIR/alert.txt
            hcienginerun -p winpath_picis

          • #70723
            Gordon Koch
            Participant

              Thank you both for your replies. I want to both stop and then start the thread in my case. Mason, is there any time delay within your script between the stop and start? From your experience, is one needed?

              Thanks.

            • #70724
              James Cobane
              Participant

                Gordon,

                You can simply use the command line syntax in your alert with an ‘exec’ action, i.e.:

                hcicmd -p processname -c ‘mythread pstop’;hcicmd -p processname -c ‘mythread pstart’

                The second command won’t run until the first command is complete.

              • #70725
                David Barr
                Participant

                  We do this with some of our threads, and it occasionally causes problems.  We have the alert set up to trigger when the outbound queue gets too large.  The problem is that sometimes the thread stop command succeeds but the thread start command fails.  We even put a 5 second delay between the stop and start, and the restart script isn’t run as a subprocess of the hcimonitord.

                  My guess is that this happens because one thread in the process is blocking all other threads.  This could cause the outbound queue to grow as well as cause hcicmd to fail.

                • #70726

                  I wish there was “API” for the threads and processes so you could program scripts to wait for the thread to return it’s state. Maybe I’ll mention that to R&D.

                  -- Max Drown (Infor)

                • #70727
                  Dirk Engels
                  Participant

                    Someone from support told us, that you cannot be sure stopping a thread  will be successful. Only a process will be killed if its not responding. Therefore we always use two alerts. One to stop the thread when the ob queue is to large, another one that restarts the thread if its down for 2 or 3 minutes (to prevent autostart as soon as it is down).

                    This works fine for all of our customers and we didn’t have any blockings anymore.

                    Regards,

                    Dirk

                  • #70728

                    Hello all!

                    we execute a script from alert configurator, we have them for many interfaces.

                    # called from: hcialertd

                    # condition: # queue > 10

                    /usr/bin/ksh -c ‘eval `/qdx/qdx5.3/integrator/bin/hcisetenv -root ksh /qdx/qdx5.

                    3/integrator/lab`;hcienginestop -p scc;sleep 60; hcienginerun -p scc’

                    b

                  • #70729
                    Gordon Koch
                    Participant

                      Thanks to all for your input. I believe running a script outside of the alert configurator is the best as the delay or sleep will not effect the monitord.

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