CpuSetCpus - File /sys/fs/cgroup/cpuset/cpuset.cpus
¶
This parser reads the content of /sys/fs/cgroup/cpuset/cpuset.cpus
.
This file shows the default cgroup cpuset.cpu of system. The format
of the content is string including comma.
-
class
insights.parsers.cpuset_cpus.
CpusetCpus
(context, extra_bad_lines=[])[source]¶ Bases:
insights.core.CommandParser
Class
CpusetCpus
parses the content of the/sys/fs/cgroup/cpuset/cpuset.cpus
.-
cpu_set
¶ It is used to show the list of allowed cpu.
- Type
list
-
cpu_number
¶ It is used to display the number of allowed cpu.
- Type
int
A small sample of the content of this file looks like:
0,2-4,7
Examples
>>> type(cpusetinfo) <class 'insights.parsers.cpuset_cpus.CpusetCpus'> >>> cpusetinfo.cpuset ["0", "2", "3", "4", "7"] >>> cpusetinfo.cpu_number 5
-