开发者

sysfs cpu information missing

I'm trying to get hold of CPU architecture information under Linux.

开发者_C百科I understand the information is available via the sysfs filesystem.

I have CentOS 5 running in a Xen VM. The sysfs filesystem is mounted. However, the /sys/devices/system/cpu/cpu0/ directory is almost empty. The only entry is a single file, "online", with a value of "1".

What gives? where's all my CPU information?


The actual cpu information is still in /proc/cpuinfo.

The sysfs-files are used to control things like scheduling and frequency settings, not to get information on the cpus themselves.


Okay, I've just had a chat with a sysadmin at work.

Looking at some machines, it looks like this information simply is not pushed by VMs. The VMs think they have a virtual CPU - rather than a CPU of the type of the real underlying CPU - and the cache information simply is not published.

It is published (and it's nice to finally see it!) on real machines with reasonably modern kernels.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜