parameters: (self, cmd, timeout=None, ignore_status_code=False)
return_statement: return stdout
docstring: The SSH connection is reused to execute shell commands on the Linux host.
          This method can be used to restart the database, collect database running environment information,
          and set database knobs.
  
          :param cmd: Shell command.
          :param timeout: Int type. Unit second.
          :param ignore_status_code: If the exit status code returned after the command is executed is unequal to 0,
                                      determine whether to ignore it. By default, it is not ignored, which may throw an
                                      exception, and some operations are insignificant or even have to be ignored.
          :return: Returns the standard output stream result after the command is executed.
          :raise: Raise ExecutionError if found error.
docstring_summary: The SSH connection is reused to execute shell commands on the Linux host.
          This method can be used to restart the database, collect database running environment information,
          and set database knobs.
docstring_tokens: The SSH connection is reused to execute shell commands on the Linux host . This method can be used to restart the database collect database running environment information and set database knobs .
function: def exec_command_on_host(self, cmd, timeout=None, ignore_status_code=False):
          """
          The SSH connection is reused to execute shell commands on the Linux host.
          This method can be used to restart the database, collect database running environment information,
          and set database knobs.
  
          :param cmd: Shell command.
          :param timeout: Int type. Unit second.
          :param ignore_status_code: If the exit status code returned after the command is executed is unequal to 0,
                                      determine whether to ignore it. By default, it is not ignored, which may throw an
                                      exception, and some operations are insignificant or even have to be ignored.
          :return: Returns the standard output stream result after the command is executed.
          :raise: Raise ExecutionError if found error.
          """
          stdout, stderr = self.ssh.exec_command_sync(cmd, timeout=timeout)
  
          if len(stderr) > 0 or self.ssh.exit_status != 0:
              error_msg = "An error occurred when executing the command '%s'. " \
                          "The error information is: %s, the output information is %s." % (cmd, stderr, stdout)
              if ignore_status_code and not (len(stderr) > 0 and self.ssh.exit_status != 0):
                  logging.warning(error_msg)
              else:
                  raise ExecutionError(error_msg)
          return stdout
function_tokens: def exec_command_on_host ( self , cmd , timeout = None , ignore_status_code = False ) : stdout , stderr = self . ssh . exec_command_sync ( cmd , timeout = timeout ) if len ( stderr ) > 0 or self . ssh . exit_status != 0 : error_msg = "An error occurred when executing the command '%s'. " "The error information is: %s, the output information is %s." % ( cmd , stderr , stdout ) if ignore_status_code and not ( len ( stderr ) > 0 and self . ssh . exit_status != 0 ) : logging . warning ( error_msg ) else : raise ExecutionError ( error_msg ) return stdout