syntax for hcienginestop

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf syntax for hcienginestop

  • Creator
    Topic
  • #55185
    Michael Hertel
    Participant

      Is there a flag for “all” processes?

      If I can stop “all” from the gui, I would think there should be a flag for the commend line.

    Viewing 5 reply threads
    • Author
      Replies
      • #84497
        Jim Kosloskey
        Participant

          On 6.0.0 the GUI asks for you to select the processes and then add them as a comma delimited list to the run command.

          I suspect you will need to get a list of all of the processes then do likewise.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #84498
          David Barr
          Participant

            I don’t see an option in the command line utility, but you could do this:

            Code:

            hcienginestop -p $(echo $(hciprocstatus | awk ‘/running/ { print $1 }’) | tr ‘ ‘ ,)

          • #84499
            Jim Kosloskey
            Participant

              From the GUI turn on viewing the command line and do your ‘all’ action on the process and you will see the syntax it creates.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #84500
              David Barr
              Participant

                The GUI is getting the process names from the host server and passing them all on the command line with commas. It doesn’t look like the command line supports a wildcard or anything that will stop all processes without listing them individually.

              • #84501
                Russ Ross
                Participant

                  I use a homegrown script called stop_all_procs.ksh to shutdown all active Cloverleaf processes in the current site.

                  Code:


                  #!/usr/bin/ksh
                  #
                  # Begin Module Header ==============================================================================
                  #
                  #——
                  # Name:
                  #——
                  #
                  # stop_all_procs.ksh
                  #
                  #———
                  # Purpose:
                  #———
                  #
                  # stop all running procs defined in the process directory
                  #
                  #——-
                  # Notes:
                  #——-
                  #
                  # none
                  #
                  #———
                  # History:
                  #———
                  #
                  # 2000.10.05 Russ Ross
                  #          – wrote initial version
                  #
                  # 2005.03.28 Russ Ross
                  #          – made script smarter by checking if the pid file exists before shutting down the process
                  #
                  # End of Module Header =============================================================================

                  for process_name in `ls $HCISITEDIR/exec/processes`; do
                    if [[ -f $HCISITEDIR/exec/processes/$process_name/pid ]]; then
                        hcienginestop -p $process_name
                    fi
                  done

                  Russ Ross
                  RussRoss318@gmail.com

                • #84502
                  Michael Hertel
                  Participant

                    Thanks for the advice.

                    I forgot about View>Command and Engine Output.

                    I haven’t used that in years.

                    Also as you point out, the GUI doesn’t really stop/start/restart ‘all’.

                    It gives you a list to chose from, thereby it builds it’s list to feed to the command.

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