def agent_running_stats():

    ps_info = []

    running = False
    loaded = False

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

    raw_output, error_output = process.communicate()

    for line in raw_output.splitlines():
        pid, run, pname = line.split('\t')
        ps_info.append((pname, run, pid))

    for p in ps_info:

        if daemon_label == p[0]:
            # p[1] can either be:
            #  : '0' meaning not running.
            #  : '-' meaning its running.
            loaded = True

            if p[1] == '-':

                running = True

                break

            elif p[1] == '0':

                running = False

    status = AgentStatus(loaded, running)
    logger.log(str(status), logger.LogLevel.Debug)

    return status