Linux系统的CPU等相关操作

http://write.blog.csdn.net/postlist1. 查看物理CPU数
linux-84:~ # cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
4

2. 查看逻辑CPU数
linux-84:~ # cat /proc/cpuinfo |grep "processor"|wc -l
64

3. 查看CPU几核
linux-84:~ # cat /proc/cpuinfo |grep "cores"|uniq
cpu cores    : 8

4. 查看CPU主频
linux-84:~ # cat /proc/cpuinfo |grep MHz|uniq
cpu MHz        : 1064.000

linux-84:~ # uname -a
Linux linux-84 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux

(查看当前操作系统内核信息)
linux-84:~ # cat /etc/issue | grep Linux
Welcome to SUSE Linux Enterprise Server 11 SP1  (x86_64) - Kernel \r (\l).

你可能感兴趣的:(Linux系统的CPU等相关操作)