Alert to Stop and Restart a thread

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Alert to Stop and Restart a thread

  • Creator
    Topic
  • #52709
    Davin Studer
    Participant

    I have an alert that has two exec actions. One is to stop the thread …

    hcicmd -p vacc -c “child_vxu_out pstop”

    and one is to start it back up …

    hcicmd -p vacc -c “child_vxu_out pstart”

    For some reason this is not happening.  My alert is firing, but the thread never restarts.  I can verify this by removing the start exec action.  When the alert fires the thread never stops.  Anyone have any idea why this would be?  By the way our system is on a Windows box.

Viewing 9 reply threads
  • Author
    Replies
    • #75233
      Davin Studer
      Participant

      By the way if I copy and paste these two actions into the command shell it does exactly what I would expect … stops and restarts.  So, the commands are written correctly and the process and thread is spelled correctly.

    • #75234
      James Cobane
      Participant

      Rather than have 2 separate ‘exec’ actions, I would recommend placing both the stop/start commands within the same ‘exec’, separated by a semi-colon, i.e.

      hcicmd -p vacc -c “child_vxu_out pstop”;hcicmd -p vacc -c “child_vxu_out pstart”

      That way, the ‘start’ won’t execute until the ‘stop’ is complete.

      I suspect that when the alert triggers, it spawns both ‘exec’ actions simultaneously, and it’s likely that your ‘start’ action is completing before the ‘stop’ (because the thread is still running and the engine detects it).  Thus the ‘stop’ ends up completing last.

      Jim Cobane

      Henry Ford Health

    • #75235
      Davin Studer
      Participant

      Except that I can remove the start completely and the thread never stops.  So, that part is not even happening.

    • #75236
      James Cobane
      Participant

      I would look at the hcimonitord.log to see if you see any indication in there that the alert is triggering, and if there are any associated error messages.

      We have several alerts that will perform a stop/start of a thread and have not had any issues.

      You can stop the hcimonitord and restart with debug enabled to see what is going on if/when the alert triggers:

      Stop the monitord:

          hcisitectl -k m

      Start the monitord (with debug):

          hcisitectl -s m -A m=-D

      Hope this helps.

      Jim Cobane

      Henry Ford Health

    • #75237
      mike brown
      Participant

      I would add a sleep in because of the thread not stopping right away..

      hcicmd -p vacc -c “child_vxu_out pstop”;  sleep 2; hcicmd -p vacc -c “child_vxu_out pstart”

      it works for me, oh and yes bounce the monitor thru GUI

      mike

    • #75238
      James Cobane
      Participant

      I would caution about adding a ‘sleep’ in the action as I believe it will ‘block’ NetMonitor for the duration of the ‘sleep’, thus not report any status during that interval.

      Thanks,

      Jim Cobane

      Henry Ford Health

    • #75239
      mike brown
      Participant

      HMM good reply, i have not had any issues with my monitor for the length of time, then again , i only let it sleep before restarting a thread for 2 seconds, which is really not long at all. good point though.

      mike

    • #75240
      Davin Studer
      Participant

      Found out the issue.  Apparently many of the hci commands do not work in alerts on a Windows system (as per Cloverleaf tech support).  Lovely!  However, there is a workaround.  If you put the command in a batch file and then execute the batch file from the alert then it works just fine … odd, but true.

    • #75241
      mike brown
      Participant

      oh windows!!!  i love unix…

      mike

    • #75242
      Davin Studer
      Participant

      It has nothing to do with the Windows OS.  It is a bug in Cloverleaf.

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

Forum Statistics

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