def save():
    """
    save function
    """
    results = {}
    cpu_number = 0

    while True:
        try:
            _file = open(
                CPU_PREFIX + 'cpu{}/cpufreq/scaling_governor'.format(cpu_number))
        except:
            break

        governor = _file.read().strip()
        results.setdefault(cpu_number, {})['governor'] = governor

        _file.close()

        try:
            _file = open(
                CPU_PREFIX + 'cpu{}/cpufreq/scaling_cur_freq'.format(cpu_number))
        except:
            break

        results[cpu_number]['freq'] = _file.read().strip()

        _file.close()

        cpu_number += 1

    return results