neutron_lib.utils.host 模块

neutron_lib.utils.host.cpu_count()

获取系统 CPU 数量。

返回值:

系统上的 CPU 数量,以整数形式表示。如果在系统上获取 CPU 数量时出现问题,则返回默认值 1。