CPU
命令lscpu
,查看的是cpu的统计信息.
[root@S11 core]# lscpu
Architecture: x86_64 #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: 2593.746
BogoMIPS: 5187.49
Virtualization: VT-x #支持cpu虚拟化技术
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
单词per的意思:每一。
单词socket的意思:座,在CPU来说是插槽。
查看/proc/cpuinfo,可以知道每个cpu信息,如每个CPU的型号,主频等。
[root@S11 core]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 62
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
stepping : 4
microcode : 0x1
cpu MHz : 2593.746
cache size : 20480 KB
.....
上面输出的是第一个cpu部分信息,还有3个cpu信息省略了。
内存
概要查看内存情况
[root@S11 core]# free -hm
total used free shared buff/cache available
Mem: 7.5G 4.3G 2.2G 42M 1.0G 2.8G
Swap: 7.7G 0B 7.7G
查看内存详细使用
[root@S11 core]# cat /proc/meminfo
MemTotal: 7898772 kB
MemFree: 2321384 kB
MemAvailable: 2965528 kB
Buffers: 1180 kB
Cached: 875784 kB
SwapCached: 0 kB
......
查看内存硬件信息
[root@S11 core]# dmidecode -t memory
# dmidecode 3.0
# SMBIOS entry point at 0x000f05e0
Found SMBIOS entry point in EFI, reading table from /dev/mem.
SMBIOS 3.0 present.
Handle 0x004C, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 64 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0x004D, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x004C
Error Information Handle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No Module Installed
Form Factor: Unknown
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: Unknown
Type Detail: None
Speed: Unknown
Manufacturer: Not Specified
Serial Number: Not Specified
Asset Tag: Not Specified
Part Number: Not Specified
Rank: Unknown
Configured Clock Speed: Unknown
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: Unknown
......
磁盘
查看硬盘和分区分布
[root@S11 core]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 930.3G 0 part
├─cl-root 253:0 0 50G 0 lvm /
├─cl-swap 253:1 0 7.8G 0 lvm [SWAP]
└─cl-home 253:2 0 872.6G 0 lvm /usr/local/yunji
sr0 11:0 1 1024M 0 rom
查看硬盘和分区的详细信息
[root@S11 core]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
磁盘 /dev/sda:1000.2 GB, 1000204886016 字节,1953525168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节
磁盘标签类型:gpt
# Start End Size Type Name
1 2048 411647 200M EFI System EFI System Partition
2 411648 2508799 1G Microsoft basic
3 2508800 1953523711 930.3G Linux LVM
磁盘 /dev/mapper/cl-root:53.7 GB, 53687091200 字节,104857600 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节
磁盘 /dev/mapper/cl-swap:8321 MB, 8321499136 字节,16252928 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节
磁盘 /dev/mapper/cl-home:936.9 GB, 936902656000 字节,1829888000 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节
网卡
查看网卡硬件信息
[root@S11 core]# lspci | grep -i 'eth'
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-LM (rev 31)