Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
def sanitize_get(self, value):
value_list = super(IntegerListFile, self).sanitize_get(value)
return list(map(int, value_list))