
1.
查看cpu型号cat /proc/cpuinfo | grep "model name" | uniq 2. 查看cpu物理个数cat /proc/cpuinfo | grep "physical id" | uniq | wc -l3.使用PyCPUID模块import pycpuidprint "has SSE2:", pycpuid.HAS_SSE2print "all availabe features:", pycpuid.features()print pycpuid.vendor(1)print "brand string:", pycpuid.brand_string()4. 查看内存信息(显示
插槽个数和每个插槽里
内存条的大小)dmidecode -t memory | grep Size5. 查看内存条厂家dmidecode -t memory | grep Manufacturer当我们需要获取机器硬件信息时,可使用linux系统自带的dmidecode工具进行查询。例:下面的Serial Number信息。
[root@az01node021 ~]# dmidecode -t 1
# dmidecode 2.11
SMBIOS 2.7 present.
Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: PowerEdge R720xd
Version: Not Specified
Serial Number: FJ2SHY1
UUID: 4C4C4544-004A-3210-8053-C6C04F485931
Wake-up Type: Power Switch
SKU Number: SKU=NotProvidedModelName=PowerEdge R720xd
Family: Not Specified
评论列表(0条)