def main(self, config_file_path, command, command_options):
        """Run the Scalyr Agent.

        @param config_file_path: The path to the configuration file.
        @param command: The command passed in at the commandline for the agent to execute, such as 'start', 'stop', etc.
        @param command_options: The options from the commandline.  These will include 'quiet', 'verbose', etc.

        @type config_file_path: str
        @type command: str

        @return:  The exit status code to exit with, such as 0 for success.
        @rtype: int
        """
        quiet = command_options.quiet
        verbose = command_options.verbose
        no_fork = command_options.no_fork

        # We process for the 'version' command early since we do not need the configuration file for it.
        if command == 'version':
            print 'The Scalyr Agent 2 version is %s' % SCALYR_VERSION
            return 0

        # Read the configuration file.  Fail if we can't read it, unless the command is stop or status.
        if config_file_path is None:
            config_file_path = self.__default_paths.config_file_path

        self.__config_file_path = config_file_path

        try:
            self.__config = self.__read_and_verify_config(config_file_path)
        except Exception, e:
            # We ignore a bad configuration file for 'stop' and 'status' because sometimes you do just accidentally
            # screw up the config and you want to let the rest of the system work enough to do the stop or get the
            # status.
            if command != 'stop' and command != 'status':
                raise Exception('Error reading configuration file: %s\n'
                                'Terminating agent, please fix the configuration file and restart agent.' % str(e))
            else:
                self.__config = None
                print >> sys.stderr, 'Could not parse configuration file at \'%s\'' % config_file_path

        self.__controller.consume_config(self.__config, config_file_path)

        self.__escalator = ScriptEscalator(self.__controller, config_file_path, os.getcwd(), command_options.no_change_user)

        # noinspection PyBroadException
        try:
            # Execute the command.
            if command == 'start':
                return self.__start(quiet, no_fork)
            elif command == 'inner_run_with_checks':
                self.__perform_config_checks()
                return self.__run(self.__controller)
            elif command == 'inner_run':
                return self.__run(self.__controller)
            elif command == 'stop':
                return self.__stop(quiet)
            elif command == 'status' and not verbose:
                return self.__status()
            elif command == 'status' and verbose:
                if self.__config is not None:
                    agent_data_path = self.__config.agent_data_path
                else:
                    agent_data_path = self.__default_paths.agent_data_path
                    print >> sys.stderr, agent_data_path % 'Assuming agent data path is \'%s\''
                return self.__detailed_status(agent_data_path)
            elif command == 'restart':
                return self.__restart(quiet, no_fork)
            elif command == 'condrestart':
                return self.__condrestart(quiet, no_fork)
            else:
                print >> sys.stderr, 'Unknown command given: "%s".' % command
                return 1
        except SystemExit:
            return 0
        except Exception, e:
            # We special case the inner_run_with checks since we know that exception is human-readable.
            if command == 'inner_run_with_checks':
                raise e
            else:
                raise Exception('Caught exception when attempt to execute command %s.  Exception was %s' %
                                (command, str(e)))
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/agent_main.py/ScalyrAgent.main/swapped operands of `%`