cpu_online - File /sys/devices/system/cpu/online
¶
This parser reads the content of /sys/devices/system/cpu/online
.
This file shows the number of online cpu. The format of the content
is string including comma.
-
class
insights.parsers.cpu_online.
ContainerCpuOnline
(context)[source]¶ Bases:
insights.core.ContainerParser
,insights.core.CommandParser
Class
ContainerCpuOnline
parses the content of the/sys/devices/system/cpu/online
from containers.-
cpu_online_set
¶ It is used to show the list of online cpu.
Type: list
-
cpu_online_number
¶ It is used to display the number of online cpu.
Type: int
A small sample of the content of this file looks like:
0,2-4,7
Examples
>>> type(container_cpu_online_info) <class 'insights.parsers.cpu_online.ContainerCpuOnline'> >>> container_cpu_online_info.container_id '2869b4e2541c' >>> container_cpu_online_info.image 'registry.access.redhat.com/ubi8/nginx-120' >>> container_cpu_online_info.cpu_online_set ['0', '2', '3', '4', '7'] >>> container_cpu_online_info.cpu_online_number 5
-