linux檢視配置指令
1.檢視CPU架構資訊
lscpu
[[email protected]*** ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Stepping: 1
CPU MHz: 2500.032
BogoMIPS: 5000.06
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 40960K
NUMA node0 CPU(s): 0-3
2. 檢視記憶體資訊
free -m
[[email protected]**** ~]# free -m
total used free shared buffers cached
Mem: 15951 15635 316 0 415 9175
-/+ buffers/cache: 6044 9907
Swap: 0 0 0
3. 檢視硬碟資訊 blk是block的縮寫,列出塊裝置
lsblk
[[email protected]**** ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 20G 0 disk
└─vda1 252:1 0 20G 0 part /
vdb 252:16 0 200G 0 disk /home
4. 檢視硬碟的使用情況
df -h
[[email protected]**** ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 20G 15G 3.9G 80% /
tmpfs 7.8G 136K 7.8G 1% /dev/shm
/dev/vdb 197G 32G 156G 17% /home
5、檢視CPU使用情況
top
6、檢視檔案佔用空間大小
du -h --max-depth=1