Linux 查看系统硬件信息(实例详解)

2017-08-08  本文已影响48人  萤火虫de梦

lscpu 命令,查看的是cpu的统计信息.

blue@blue-pc:~$ lscpu
Architecture:          i686            #cpu架构
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian   #小尾序
CPU(s):                4               #总共有4核
On-line CPU(s) list:   0-3
Thread(s) per core:    1               #每个cpu核,只能支持一个线程,即不支持超线程
Core(s) per socket:    4               #每个cpu,有4个核
Socket(s):             1               #总共有1一个cpu
Vendor ID:             GenuineIntel    #cpu产商 intel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               1600.000
BogoMIPS:              5986.12
Virtualization:        VT-x            #支持cpu虚拟化技术
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K

查看/proc/cpuinfo,可以知道每个cpu信息,如每个CPU的型号,主频等。

### cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 42
model name    : Intel(R) Core(TM) i5-2320 CPU @ 3.00GHz

free -m 概要查看内存情况

    total       used       free     shared    buffers     cached
Mem:          3950        347       3603          0         18        246
-/+ buffers/cache:         82       3868
Swap:            0          0          0

这里的单位是MB,总共的内存是3950MB

cat /proc/meminfo 查看内存详细使用

MemTotal:        4020868 kB
MemFree:          230884 kB
Buffers:            7600 kB
Cached:           454772 kB
SwapCached:          836 kB

lsblk 或者df -h 查看硬盘和分区分布

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        79G  1.2G   74G   2% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            2.0G  4.0K  2.0G   1% /dev
tmpfs           396M  336K  395M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
上一篇下一篇

猜你喜欢

热点阅读