lscpuコマンド - CPUの情報を表示

CentOS-6 でCPU情報を表示する lscpu コマンドが使えることに気がついた。


$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Socket(s):             1
ベンダーID:        GenuineIntel
CPUファミリー:    15
モデル:             4
ステッピング:    9
CPU MHz:               2660.234
BogoMIPS:              5320.46
L1d キャッシュ:   16K
L2 キャッシュ:    256K


$ lscpu --help

 lscpu [options]

 -a, --all               print online and offline CPUs (default for -e)
 -b, --online            print online CPUs only (default for -p)
 -c, --offline           print offline CPUs only
 -e, --extended[=<list>] print out an extended readable format
 -h, --help              print this help
 -p, --parse[=<list>]    print out a parsable format
 -s, --sysroot <dir>     use directory DIR as system root
 -V, --version           print version information and exit
 -x, --hex               print hexadecimal masks rather than lists of CPUs

Available columns:
           CPU  logical CPU number
          CORE  logical core number
        SOCKET  logical socket number
          NODE  logical NUMA node number
          BOOK  logical book number
         CACHE  shows how caches are shared between CPUs
  POLARIZATION  CPU dispatching mode on virtual hardware
       ADDRESS  physical address of a CPU
    CONFIGURED  shows if the hypervisor has allocated the CPU
        ONLINE  shows if Linux currently makes use of the CPU

For more details see lscpu(1).

util-linux-ng パッケージに含まれている。

$ which lscpu

$ rpm -qf /usr/bin/lscpu