开发者

A programmatic way to discover the number of CPUs and spec for each CPU/Core in Ubuntu Karmic?

开发者 https://www.devze.com 2022-12-25 16:58 出处:网络
A programmatic way to discover the number of CPUs and spec for each CPU/Core in Ubuntu Karmic? Bash or C/C++, Python, Perl a开发者_运维问答re fine. Thanks!cat /proc/cpuinfo

A programmatic way to discover the number of CPUs and spec for each CPU/Core in Ubuntu Karmic? Bash or C/C++, Python, Perl a开发者_运维问答re fine. Thanks!


cat /proc/cpuinfo


you can try lshw if you have it. Other useful tools include lspci, lshal, biosdecode etc. also try /proc/cpuinfo and others at /proc

@OP /proc/cpuinfo is just a normal file, so you can use any tools that can display file info to view it (besides cat. cat is used for concatenating files by the way)

$ more /proc/cpuinfo
$ awk '{print}' /proc/cpuinfo
$ while read -r line; do echo $line;done < /proc/cpuinfo
0

精彩评论

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