How to use the cgroupspy.interfaces.IntegerFile 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
memory.memsw.usage_in_bytes
    memory.move_charge_at_immigrate
    memory.numa_stat
    memory.oom_control
    memory.pressure_level
    memory.soft_limit_in_bytes
    memory.stat
    memory.swappiness
    memory.usage_in_bytes
    memory.use_hierarchy
    """

    failcnt = IntegerFile("memory.failcnt")
    memsw_failcnt = IntegerFile("memory.memsw.failcnt")

    limit_in_bytes = IntegerFile("memory.limit_in_bytes")
    soft_limit_in_bytes = IntegerFile("memory.soft_limit_in_bytes")
    usage_in_bytes = IntegerFile("memory.usage_in_bytes")
    max_usage_in_bytes = IntegerFile("memory.max_usage_in_bytes")

    memsw_limit_in_bytes = IntegerFile("memory.memsw.limit_in_bytes")
    memsw_usage_in_bytes = IntegerFile("memory.memsw.usage_in_bytes")
    memsw_max_usage_in_bytes = IntegerFile("memory.memsw.max_usage_in_bytes")
    swappiness = IntegerFile("memory.swappiness")

    stat = DictFile("memory.stat", readonly=True)

    use_hierarchy = FlagFile("memory.use_hierarchy")
    force_empty = FlagFile("memory.force_empty")
    oom_control = FlagFile("memory.oom_control")

    move_charge_at_immigrate = BitFieldFile("memory.move_charge_at_immigrate")
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
class CpuController(Controller):

    """
    Cpu cGroup controller. Provides access to

    cpu.cfs_period_us
    cpu.cfs_quota_us
    cpu.rt_period_us
    cpu.rt_runtime_us
    cpu.shares
    cpu.stat
    """
    cfs_period_us = IntegerFile("cpu.cfs_period_us")
    cfs_quota_us = IntegerFile("cpu.cfs_quota_us")
    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)
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
memory.usage_in_bytes
    memory.use_hierarchy
    """

    failcnt = IntegerFile("memory.failcnt")
    memsw_failcnt = IntegerFile("memory.memsw.failcnt")

    limit_in_bytes = IntegerFile("memory.limit_in_bytes")
    soft_limit_in_bytes = IntegerFile("memory.soft_limit_in_bytes")
    usage_in_bytes = IntegerFile("memory.usage_in_bytes")
    max_usage_in_bytes = IntegerFile("memory.max_usage_in_bytes")

    memsw_limit_in_bytes = IntegerFile("memory.memsw.limit_in_bytes")
    memsw_usage_in_bytes = IntegerFile("memory.memsw.usage_in_bytes")
    memsw_max_usage_in_bytes = IntegerFile("memory.memsw.max_usage_in_bytes")
    swappiness = IntegerFile("memory.swappiness")

    stat = DictFile("memory.stat", readonly=True)

    use_hierarchy = FlagFile("memory.use_hierarchy")
    force_empty = FlagFile("memory.force_empty")
    oom_control = FlagFile("memory.oom_control")

    move_charge_at_immigrate = BitFieldFile("memory.move_charge_at_immigrate")

    # Requires special file interface
    # numa_stat =

    # Requires eventfd handling - https://www.kernel.org/doc/Documentation/cgroups/memory.txt
    # pressure_level =

github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
"""
    Cpu cGroup controller. Provides access to

    cpu.cfs_period_us
    cpu.cfs_quota_us
    cpu.rt_period_us
    cpu.rt_runtime_us
    cpu.shares
    cpu.stat
    """
    cfs_period_us = IntegerFile("cpu.cfs_period_us")
    cfs_quota_us = IntegerFile("cpu.cfs_quota_us")
    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):
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
memory.swappiness
    memory.usage_in_bytes
    memory.use_hierarchy
    """

    failcnt = IntegerFile("memory.failcnt")
    memsw_failcnt = IntegerFile("memory.memsw.failcnt")

    limit_in_bytes = IntegerFile("memory.limit_in_bytes")
    soft_limit_in_bytes = IntegerFile("memory.soft_limit_in_bytes")
    usage_in_bytes = IntegerFile("memory.usage_in_bytes")
    max_usage_in_bytes = IntegerFile("memory.max_usage_in_bytes")

    memsw_limit_in_bytes = IntegerFile("memory.memsw.limit_in_bytes")
    memsw_usage_in_bytes = IntegerFile("memory.memsw.usage_in_bytes")
    memsw_max_usage_in_bytes = IntegerFile("memory.memsw.max_usage_in_bytes")
    swappiness = IntegerFile("memory.swappiness")

    stat = DictFile("memory.stat", readonly=True)

    use_hierarchy = FlagFile("memory.use_hierarchy")
    force_empty = FlagFile("memory.force_empty")
    oom_control = FlagFile("memory.oom_control")

    move_charge_at_immigrate = BitFieldFile("memory.move_charge_at_immigrate")

    # Requires special file interface
    # numa_stat =

    # Requires eventfd handling - https://www.kernel.org/doc/Documentation/cgroups/memory.txt
    # pressure_level =
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
class CpuController(Controller):

    """
    Cpu cGroup controller. Provides access to

    cpu.cfs_period_us
    cpu.cfs_quota_us
    cpu.rt_period_us
    cpu.rt_runtime_us
    cpu.shares
    cpu.stat
    """
    cfs_period_us = IntegerFile("cpu.cfs_period_us")
    cfs_quota_us = IntegerFile("cpu.cfs_quota_us")
    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)
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
memory.move_charge_at_immigrate
    memory.numa_stat
    memory.oom_control
    memory.pressure_level
    memory.soft_limit_in_bytes
    memory.stat
    memory.swappiness
    memory.usage_in_bytes
    memory.use_hierarchy
    """

    failcnt = IntegerFile("memory.failcnt")
    memsw_failcnt = IntegerFile("memory.memsw.failcnt")

    limit_in_bytes = IntegerFile("memory.limit_in_bytes")
    soft_limit_in_bytes = IntegerFile("memory.soft_limit_in_bytes")
    usage_in_bytes = IntegerFile("memory.usage_in_bytes")
    max_usage_in_bytes = IntegerFile("memory.max_usage_in_bytes")

    memsw_limit_in_bytes = IntegerFile("memory.memsw.limit_in_bytes")
    memsw_usage_in_bytes = IntegerFile("memory.memsw.usage_in_bytes")
    memsw_max_usage_in_bytes = IntegerFile("memory.memsw.max_usage_in_bytes")
    swappiness = IntegerFile("memory.swappiness")

    stat = DictFile("memory.stat", readonly=True)

    use_hierarchy = FlagFile("memory.use_hierarchy")
    force_empty = FlagFile("memory.force_empty")
    oom_control = FlagFile("memory.oom_control")

    move_charge_at_immigrate = BitFieldFile("memory.move_charge_at_immigrate")
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
memory.soft_limit_in_bytes
    memory.stat
    memory.swappiness
    memory.usage_in_bytes
    memory.use_hierarchy
    """

    failcnt = IntegerFile("memory.failcnt")
    memsw_failcnt = IntegerFile("memory.memsw.failcnt")

    limit_in_bytes = IntegerFile("memory.limit_in_bytes")
    soft_limit_in_bytes = IntegerFile("memory.soft_limit_in_bytes")
    usage_in_bytes = IntegerFile("memory.usage_in_bytes")
    max_usage_in_bytes = IntegerFile("memory.max_usage_in_bytes")

    memsw_limit_in_bytes = IntegerFile("memory.memsw.limit_in_bytes")
    memsw_usage_in_bytes = IntegerFile("memory.memsw.usage_in_bytes")
    memsw_max_usage_in_bytes = IntegerFile("memory.memsw.max_usage_in_bytes")
    swappiness = IntegerFile("memory.swappiness")

    stat = DictFile("memory.stat", readonly=True)

    use_hierarchy = FlagFile("memory.use_hierarchy")
    force_empty = FlagFile("memory.force_empty")
    oom_control = FlagFile("memory.oom_control")

    move_charge_at_immigrate = BitFieldFile("memory.move_charge_at_immigrate")

    # Requires special file interface
    # numa_stat =

    # Requires eventfd handling - https://www.kernel.org/doc/Documentation/cgroups/memory.txt
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
cfs_quota_us = IntegerFile("cpu.cfs_quota_us")
    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
github cloudsigma / cgroupspy / cgroupspy / controllers.py View on Github external
memory.memsw.limit_in_bytes
    memory.memsw.max_usage_in_bytes
    memory.memsw.usage_in_bytes
    memory.move_charge_at_immigrate
    memory.numa_stat
    memory.oom_control
    memory.pressure_level
    memory.soft_limit_in_bytes
    memory.stat
    memory.swappiness
    memory.usage_in_bytes
    memory.use_hierarchy
    """

    failcnt = IntegerFile("memory.failcnt")
    memsw_failcnt = IntegerFile("memory.memsw.failcnt")

    limit_in_bytes = IntegerFile("memory.limit_in_bytes")
    soft_limit_in_bytes = IntegerFile("memory.soft_limit_in_bytes")
    usage_in_bytes = IntegerFile("memory.usage_in_bytes")
    max_usage_in_bytes = IntegerFile("memory.max_usage_in_bytes")

    memsw_limit_in_bytes = IntegerFile("memory.memsw.limit_in_bytes")
    memsw_usage_in_bytes = IntegerFile("memory.memsw.usage_in_bytes")
    memsw_max_usage_in_bytes = IntegerFile("memory.memsw.max_usage_in_bytes")
    swappiness = IntegerFile("memory.swappiness")

    stat = DictFile("memory.stat", readonly=True)

    use_hierarchy = FlagFile("memory.use_hierarchy")
    force_empty = FlagFile("memory.force_empty")
    oom_control = FlagFile("memory.oom_control")