NUMACpus - file /sys/devices/system/node/node[0-9]*/cpulist

This parser will parse the content from cpulist file, from individual NUMA nodes. This parser will return data in (dict) format.

Sample Content from /sys/devices/system/node/node0/cpulist:

0-6,14-20

Examples

>>> type(numa_cpus_obj)
<class 'insights.parsers.numa_cpus.NUMACpus'>
>>> numa_cpus_obj.numa_node_name
'node0'
>>> numa_cpus_obj.numa_node_details() == {'numa_node_range': ['0-6', '14-20'], 'total_cpus': 14, 'numa_node_name': 'node0'}
True
>>> numa_cpus_obj.numa_node_cpus
['0-6', '14-20']
>>> numa_cpus_obj.total_numa_node_cpus
14
class insights.parsers.numa_cpus.NUMACpus(context)[source]

Bases: LegacyItemAccess, Parser

Parse /sys/devices/system/node/node[0-9]*/cpulist file, return a dict which contains total number of CPUs per numa node.

property numa_node_cpus

It will return list of CPUs present under NUMA node when set, else None.

Type

(list)

numa_node_details()[source]

(dict): it will return the number of CPUs per NUMA, NUMA node name, CPU range, when set, else None.

property numa_node_name

It will return the CPU node name when set, else None.

Type

(str)

parse_content(content)[source]

This method must be implemented by classes based on this class.

property total_numa_node_cpus

It will return total number of CPUs per NUMA node

Type

(int)