lscpu
: Show "threads per core" count
This commit is contained in:
parent
c6a3659029
commit
4b6b9f9291
@ -125,6 +125,13 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||||||
|
|
||||||
let socket_count = &cpu_topology.socket_count();
|
let socket_count = &cpu_topology.socket_count();
|
||||||
let core_count = &cpu_topology.core_count();
|
let core_count = &cpu_topology.core_count();
|
||||||
|
|
||||||
|
model_name_info.add_child(CpuInfo::new(
|
||||||
|
"Thread(s) per core",
|
||||||
|
&(cpu_topology.cpus.len() / core_count).to_string(),
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
|
||||||
model_name_info.add_child(CpuInfo::new(
|
model_name_info.add_child(CpuInfo::new(
|
||||||
"Core(s) per socket",
|
"Core(s) per socket",
|
||||||
&(core_count / socket_count).to_string(),
|
&(core_count / socket_count).to_string(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user