# 查看物理CPU个数
cat /proc/cpuinfo | grep "physical id" | sort | uniq
# 查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo | grep "cpu cores" | uniq
# 查看每个物理CPU中线程的个数
cat /proc/cpuinfo | grep "siblings" | uniq
# 查看逻辑CPU的个数
cat /proc/cpuinfo| grep "processor"
# 查看CPU型号
cat /proc/cpuinfo | grep "model name" | uniq
#查看操作系统
cat /etc/redhat-release
内存
xxx@localhost ~]$ free -m
total used free shared buffers cached
Mem: 7868 954 6914 0 64 619
-/+ buffers/cache: 271 7597
Swap: 4031 0 4031
硬盘
1. lsblk:blk是block的缩写。列出块设备
[xxx@localhost ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sdb 8:16 0 100G 0 disk
└─sdb1 8:17 0 100G 0 part /data
sda 8:0 0 60G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 59.5G 0 part
├─VolGroup-lv_root (dm-0) 253:0 0 50G 0 lvm /
├─VolGroup-lv_swap (dm-1) 253:1 0 4G 0 lvm [SWAP]
└─VolGroup-lv_home (dm-2) 253:2 0 5.6G 0 lvm /home
[xxx@l
df:查看硬盘使用情况。
localhost ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 50G 1.7G 46G 4% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 485M 39M 421M 9% /boot
/dev/mapper/VolGroup-lv_home 5.5G 165M 5.1G 4% /home
/dev/sdb1 99G 188M 94G 1% /data