How to use the cgroupspy.interfaces.IntegerListFile function in cgroupspy

To help you get started, we’ve selected a few cgroupspy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
rt_period_us = IntegerFile("cpu.rt_period_us")
    rt_runtime_us = IntegerFile("cpu.rt_runtime_us")
    shares = IntegerFile("cpu.shares")
    stat = DictFile("cpu.stat", readonly=True)


class CpuAcctController(Controller):

    """
    cpuacct.stat
    cpuacct.usage
    cpuacct.usage_percpu
    """
    acct_stat = DictFile("cpuacct.stat", readonly=True)
    usage = IntegerFile("cpuacct.usage")
    usage_percpu = IntegerListFile("cpuacct.usage_percpu", readonly=True)


class CpuSetController(Controller):

    """
    CpuSet cGroup controller. Provides access to

    cpuset.cpu_exclusive
    cpuset.cpus
    cpuset.mem_exclusive
    cpuset.mem_hardwall
    cpuset.memory_migrate
    cpuset.memory_pressure
    cpuset.memory_pressure_enabled
    cpuset.memory_spread_page
    cpuset.memory_spread_slab
github cloudsigma / cgroupspy / cgroupspy / interfaces.py View on Github external
def sanitize_get(self, value):
        value_list = super(IntegerListFile, self).sanitize_get(value)
        return list(map(int, value_list))