最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】CentOS中查看CPU和内存等硬件配置信息

CentOS crifan 3656浏览 0评论

折腾:

【记录】登录和配置腾讯云CVM云主机服务器

期间,想要查看刚买到的腾讯云的香港节点的2C4G的服务器,CentOS系统,查看硬件配置信息,包括CPU,内存等。

crifan centos 配置信息

查看centos硬件配置 – lampsunny的专栏 – CSDN博客

<code>[root@VM_0_11_centos ~]# dmidecode
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.
13 structures occupying 383 bytes.
Table at 0x000FD890.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Bochs
        Version: Bochs
        Release Date: 01/01/2011
        Address: 0xE8000
        Runtime Size: 96 kB
        ROM Size: 64 kB
        Characteristics:
                BIOS characteristics not supported
                Targeted content distribution is supported
        BIOS Revision: 1.0

Handle 0x0100, DMI type 1, 27 bytes
System Information
        Manufacturer: Bochs
        Product Name: Bochs
        Version: Not Specified
        Serial Number: 5906281d-94ae-432d-839a-d699e6ea898d
        UUID: 5906281D-94AE-432D-839A-D699E6EA898D
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: Not Specified

Handle 0x0300, DMI type 3, 20 bytes
Chassis Information
        Manufacturer: Bochs
        Type: Other
        Lock: Not Present
        Version: Not Specified
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: Unknown
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: Unspecified

Handle 0x0401, DMI type 4, 32 bytes
Processor Information
        Socket Designation: CPU 1
        Type: Central Processor
        Family: Other
        Manufacturer: Bochs
        ID: F1 06 04 00 FF FB 8B 1F
        Version: Not Specified
        Voltage: Unknown
        External Clock: Unknown
        Max Speed: 2000 MHz
        Current Speed: 2000 MHz
        Status: Populated, Enabled
        Upgrade: Other
        L1 Cache Handle: Not Provided
        L2 Cache Handle: Not Provided
        L3 Cache Handle: Not Provided

Handle 0x0402, DMI type 4, 32 bytes
Processor Information
        Socket Designation: CPU 2
        Type: Central Processor
        Family: Other
        Manufacturer: Bochs
        ID: F1 06 04 00 FF FB 8B 1F
        Version: Not Specified
        Voltage: Unknown
        External Clock: Unknown
        Max Speed: 2000 MHz
        Current Speed: 2000 MHz
        Status: Populated, Enabled
        Upgrade: Other
        L1 Cache Handle: Not Provided
        L2 Cache Handle: Not Provided
        L3 Cache Handle: Not Provided

Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
        Location: Other
        Use: System Memory
        Error Correction Type: Multi-bit ECC
        Maximum Capacity: 4 GB
        Error Information Handle: Not Provided
        Number Of Devices: 1

Handle 0x1100, DMI type 17, 21 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: 0x0000
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 4096 MB
        Form Factor: DIMM
        Set: None
        Locator: DIMM 0
        Bank Locator: Not Specified
        Type: RAM
        Type Detail: None

Handle 0x1300, DMI type 19, 15 bytes
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x000DFFFFFFF
        Range Size: 3584 MB
        Physical Array Handle: 0x1000
        Partition Width: 1

Handle 0x1301, DMI type 19, 15 bytes
Memory Array Mapped Address
        Starting Address: 0x00100000000
        Ending Address: 0x0011FFFFFFF
        Range Size: 512 MB
        Physical Array Handle: 0x1000
        Partition Width: 1

Handle 0x1400, DMI type 20, 19 bytes
Memory Device Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x000DFFFFFFF
        Range Size: 3584 MB
        Physical Device Handle: 0x1100
        Memory Array Mapped Address Handle: 0x1300
        Partition Row Position: 1

Handle 0x1401, DMI type 20, 19 bytes
Memory Device Mapped Address
        Starting Address: 0x00100000000
        Ending Address: 0x0011FFFFFFF
        Range Size: 512 MB
        Physical Device Handle: 0x1100
        Memory Array Mapped Address Handle: 0x1301
        Partition Row Position: 1

Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

Handle 0x7F00, DMI type 127, 4 bytes
End Of Table
</code>

期间:

【无需解决】新购腾讯云香港服务器SSH连接操作非常卡顿

以及:

<code>[root@VM_0_11_centos ~]# cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 79
model name      : Intel(R) Xeon(R) CPU E5-26xx v4
stepping        : 1
microcode       : 0x1
cpu MHz         : 2394.454
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl eagerfpu 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 3dnowprefetch bmi1 avx2 bmi2 rdseed adx xsaveopt
bogomips        : 4788.90
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 79
model name      : Intel(R) Xeon(R) CPU E5-26xx v4
stepping        : 1
microcode       : 0x1
cpu MHz         : 2394.454
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl eagerfpu 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 3dnowprefetch bmi1 avx2 bmi2 rdseed adx xsaveopt
bogomips        : 4788.90
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:
</code>

简化CPU信息:

<code>[root@VM_0_11_centos ~]# cat /proc/cpuinfo | grep processor
processor       : 0
processor       : 1
</code>

CPU位数:

<code>[root@VM_0_11_centos ~]# getconf LONG_BIT
64
</code>

磁盘:

<code>[root@VM_0_11_centos ~]# fdisk -l

Disk /dev/vda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d64b4

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   104857599    52427776   83  Linux
[root@VM_0_11_centos ~]# 
[root@VM_0_11_centos ~]# 
[root@VM_0_11_centos ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        50G  1.5G   46G   4% /
devtmpfs        1.9G     0  1.9G   0% /dev
tmpfs           1.9G   24K  1.9G   1% /dev/shm
tmpfs           1.9G  444K  1.9G   1% /run
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           380M     0  380M   0% /run/user/0
[root@VM_0_11_centos ~]# cat /proc/partitions
major minor  #blocks  name

 253        0   52428800 vda
 253        1   52427776 vda1
  11        0      37888 sr0
</code>

【总结】

  • 系统硬件信息总览:dmidecode

    • CPU部分:dmidecode | grep CPU

    • 内存部分: 总容量=最大容 * 内存槽个数

      • 最大容量:dmidecode | grep “Maximum Capacity”

      • 内存槽个数:dmidecode | grep “Number Of Devices”

  • CPU

    • 完整信息:cat /proc/cpuinfo

    • 精简信息:cat /proc/cpuinfo | grep processor

  • 内存

    • 完整信息:cat /proc/meminfo

  • 硬盘:

    • 可用磁盘空间:df -h

    • 磁盘信息空间大小:fdisk -l | grep GB

转载请注明:在路上 » 【已解决】CentOS中查看CPU和内存等硬件配置信息

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.194 seconds, using 22.14MB memory