def __start(self, quiet, no_fork):
        """Executes the start command.

        This will perform some initial checks to see if the agent can be started, such as making sure it can
        read and write to the logs and data directory, and that it can send a successful message to the
        Scalyr servers (therefore verifying the authentication token is correct.)

        After it determines that the agent is likely to be able to run, it will start the real agent.  If no_fork
        is False, then a new process will be started in the background and this method will return.  Otherwise,
        this method will not return.

        @param quiet: True if output should be kept to a minimal and only record errors that occur.
        @param no_fork: True if this method should not fork a separate process to run the agent, but run it
            directly instead.  If it is False, then a daemon process will be forked and will run the agent.

        @type quiet: bool
        @type no_fork: bool

        @return:  The exit status code for the process.
        @rtype: int
        """
        # First, see if we have to change the user that is executing this script to match the owner of the config.
        if self.__escalator.is_user_change_required():
            return self.__escalator.change_user_and_rerun_script('start the scalyr agent')

        # Make sure we do not try to start it up again.
        self.__fail_if_already_running()

        # noinspection PyBroadException
        try:
            self.__perform_config_checks()
        except Exception, e:
            print >> sys.stderr
            print >> sys.stderr, str(e) % '%s'
            print >> sys.stderr, 'Terminating agent, please fix the error and restart the agent.'
            return 1

        if not no_fork:
            # Do one last check to just cut down on the window of race conditions.
            self.__fail_if_already_running()

            if not quiet:
                print "Configuration and server connection verified, starting agent in background."
            self.__controller.start_agent_service(self.__run, quiet, fork=True)
        else:
            self.__controller.start_agent_service(self.__run, quiet, fork=False)

        return 0
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/agent_main.py/ScalyrAgent.__start/swapped operands of `%`