def start_agent():

    result = False
    try:

        process = subprocess.Popen(start_command, stdout=subprocess.PIPE,
                                   stderr=subprocess.PIPE)

        raw_output, error_output = process.communicate()

        if raw_output == '' and error_output == '':

            logger.log('Agent started.')
            result = True

        elif 'No such process' in error_output:

            logger.log('Agent not found.')

        else:

            logger.log('Unknown output: "%s"' % error_output)

    except Exception as e:

        logger.log("Could not start agent.", logger.LogLevel.Error)
        logger.log_exception(e)

    return result