如何在Go语言中查找CPU拓扑结构?

huangapple go评论83阅读模式
英文:

How to find the cpu topology in go language?

问题

我想在Go语言中使用CPU拓扑结构。所谓拓扑结构,指的是NUMA拓扑结构。是否有任何可以实现这一功能的包?或者,是否有一个可以返回CPU拓扑结构的包,我可以在其基础上进行修改以返回NUMA拓扑结构?

谢谢。

英文:

So I want to use cpu topology in go language. By topology, I mean, NUMA topology. Is there any package out there to do that? Or may be, a package that returns cpu topology, and I can modify on top of that to return NUMA topology.

TIA.

答案1

得分: 2

你需要它支持跨平台吗?你可以在Linux上解析/proc/cpuinfo。

这个人似乎已经开始获取CPU拓扑的工作。

英文:

Do you need it to be cross platform? You could parse /proc/cpuinfo on linux.

This individual seems to have a start on getting CPU topology.

huangapple
  • 本文由 发表于 2015年8月25日 18:16:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/32201338.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定