1、linux 查看服务器序列号(S/N)
[root@oss20hb106 ~]# dmidecode -t 1
# dmidecode 2.11
# SMBIOS entry point at 0x793fc000
SMBIOS 2.8 present.
# SMBIOS implementations newer than version 2.7 are not
# fully supported by this version of dmidecode.
Handle 0x0023, DMI type 1, 27 bytes
System Information
Manufacturer: LENOVO
Product Name: System x3650 M5: -[5462V4L]-
Version: 11
Serial Number: 06HLE**
UUID: 70887472-F0A2-E511-AA98-0894EF0A6FB0
Wake-up Type: Power Switch
SKU Number: (none)
Family: System X
2、查看CPU信息
查看物理CPU个数:
[root@redhat ~]# cat /proc/cpuinfo |grep physical|sort|uniq -c
4 address sizes : 42 bits physical, 48 bits virtual
4 physical id : 0 (1个4核CPU)
[root@localhost ~]# cat /proc/cpuinfo |grep physical|sort|uniq -c
8 address sizes : 40 bits physical, 48 bits virtual
4 physical id : 0
4 physical id : 1 (2个4核CPU)
查看逻辑CPU的个数:
[root@redhat ~]# cat /proc/cpuinfo| grep "processor"| wc -l
4
查看每个物理CPU的核数:
[root@redhat ~]# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores : 4 (4核)
3、查看运行位数
[root@redhat ~]# getconf LONG_BIT
64
当前CPU工作在64位模式下(即操作系统是64位的)。
查看CPU是否支持64bit:
[root@test ~]# cat /proc/cpuinfo |grep flags|grep "lm"
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc up
arch_perfmon xtopology tsc_reliable nonstop_tsc unfair_spinlock pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer
aes xsave avx f16c rdrand hypervisor lahf_lm abm arat xsaveopt fsgsbase bmi1 avx2 smep bmi2 invpcid
[root@redhat ~]# cat /proc/cpuinfo |grep flags|grep "lm"|wc -l
4
如果flags中有lm,则表示支持64位,lm的意思是long mode
即如结果大于0, 说明支持64bit处理模式,64位的CPU必须运行在64位的操作系统下,才能实现64位的运算模式。
4、服务器型号查询
[root@redhat ~]# dmidecode |grep -i "product name"
Product Name: PowerEdge R620
Product Name: 0D2D5F
5、查看网卡信息
[root@redhat ~]# dmesg |grep -i eth
e1000 0000:02:01.0: eth0: (PCI:66MHz:32-bit) 00:0c:29:cb:69:82
e1000 0000:02:01.0: eth0: Intel(R) PRO/1000 Network Connection
e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
8021q: adding VLAN 0 to HW filter on device eth0
eth0: no IPv6 routers present
6、查看系统支持的文件系统类型
[root@redhat ~]# cat /etc/filesystems
ext4
ext3
ext2
nodev proc
nodev devpts
iso9660
vfat
hfs
hfsplus
7、查看硬盘分区UUID
[root@redhat ~]# blkid
/dev/sda3: UUID="50af6197-ee73-4b08-9065-6a342bedc2ac" TYPE="ext4"
/dev/sda1: UUID="3deb1f67-c7b1-4367-aaa4-0729c179f2cc" TYPE="ext4"
/dev/sda2: UUID="3092138e-324c-4fb2-bb8d-970777669a69" TYPE="swap"
硬盘分区信息查看:
8、dmidecode指令
[root@redhat ~]# dmidecode -t
dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
bios
system
baseboard (查看主板信息)
chassis
processor
memory
cache
connector
slot