hcicmd shutdown multiple threads

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf hcicmd shutdown multiple threads

  • Creator
    Topic
  • #55517
    Todd Horst
    Participant

      I’m trying to stop/start multiple threads in one command using any command.

      I figured out that I could do it, provided they are all in the same process

      Code:

      hcicmd -s site1 -p process1 -c ‘thread1,thread2 pstop’

      However, I am unable to figure out how to interact with thread3 and thread4 that are contained in process2 all in the same command. In my particular use case they would all be in the same site, but it would be even better if I could interact with threads from another site as well.

      Is there a way to do what I’m looking to do, or am I required to do this in multiple commands?

    Viewing 4 reply threads
    • Author
      Replies
      • #85600
        James Cobane
        Participant

          Todd,

          You would need additional commands to stop the other threads in a different process, but you could combine them into one command line:

          hcicmd -s site1 -p process1 -c ‘thread1,thread2 pstop’;hcicmd -s site1 -p process2 -c ‘thread3,thread4 pstop’

          Similarly, I believe you would need additional commands for the second site.

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #85601
          Keith McLeod
          Participant

            What version of Cloverleaf?  And have you tried in tcl.

            I use this little piece of code in tcl to help roll through sites.  This is with 6.1.2 version of cloverleaf, so not sure on the older versions

            if ![catch {netcfgLoad} err] {

                   NCFG:ChangeSite $sitedir

                   netcfgLoad

            }

            Once you do the NFG:ChangeSite, you must reload netcfgLoad to now have access to code on a different site.

            netconfig get connection list

            Look up the other commands

            for netconfig or netcfgGetProcConns

          • #85602
            Todd Horst
            Participant

              Keith,

              Thanks for the reply. I don’t want to shut down all threads, its a dynamic set based on users input, but when they user makes their selection it would apply just that selection to the command.

            • #85603
              Steve Williams
              Participant

                Todd, the command syntax:

                   hcicmd -p [-s ] [-t ] [-h host] [-c …] [-v] [-w ] [-help]

                It sounds like you are wanting to issue pstop, and possibly pstart, commands from an outside utility to any number of threads, even across sites. As you can see from the help file, the only required field is the process. This is because this utility passes the desired cmd to running engine processes for actual fulfillment. As such, yes, you will need to execute multiple hcicmd commands to communicate to multiple controlling engine processes. I’ve used it many times in various scenarios and the really good news is that the hcicmd utility is designed to work across multiple sites and even multiple servers. The down side is a running thread really cannot stop itself without an outside actor. Hope this helps.

              • #85604
                Peter Heggie
                Participant

                  Is there any harm in submitting multiple lines of commands at once, into the background with a trailing &, to try to get them all down faster?

                  Peter Heggie

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