cpuset_cpus - 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.ContainerCpusetCpus(context)[source]
Bases:
ContainerParser
,CpusetCpus
Class
ContainerCpusetCpus
parses the content of the/sys/fs/cgroup/cpuset/cpuset.cpus
from containers.- 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(container_cpusetinfo) <class 'insights.parsers.cpuset_cpus.ContainerCpusetCpus'> >>> container_cpusetinfo.container_id '2869b4e2541c' >>> container_cpusetinfo.image 'registry.access.redhat.com/ubi8/nginx-120' >>> container_cpusetinfo.cpu_set ['0', '2', '3', '4', '7'] >>> container_cpusetinfo.cpu_number 5
- class insights.parsers.cpuset_cpus.CpusetCpus(context, extra_bad_lines=None)[source]
Bases:
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.cpu_set ['0', '2', '3', '4', '7'] >>> cpusetinfo.cpu_number 5