Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does linux view cpu, memory, and version information

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you linux how to view cpu, memory, version information, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Hardware information of the test machine:

View CPU information (model number)

# cat / proc/cpuinfo | grep name | cut-f2-d: | uniq-c

8 Intel (R) Xeon (R) CPU E5410 @ 2.33GHz

(see that there are 8 logical CPU and also know the CPU model)

# cat / proc/cpuinfo | grep physical | uniq-c

4 physical id: 0

4 physical id: 1

(which means it's actually two 4-core CPU)

# getconf LONG_BIT

thirty-two

(indicates that CPU is running in 32bit mode, but it does not mean that CPU does not support 64bit)

# cat / proc/cpuinfo | grep flags | grep'lm'| wc-l

eight

(the result is greater than 0, indicating that 64bit computing is supported. Lm refers to long mode, while supporting lm means 64bit)

Take a full look at the details of cpu, but most of us don't care about it.

# dmidecode | grep 'Processor Information'

View memory information

# cat / proc/meminfo

# uname-a

Linux euis1 2.6.9-55.ELsmp # 1 SMP Fri Apr 20 17:03:35 EDT 2007 i686

I686 i386 GNU/Linux

(view current operating system kernel information)

# cat / etc/issue | grep Linux

Red Hat Enterprise Linux AS release 4 (Nahant Update 5)

(view current operating system release information)

Check the machine model

# dmidecode | grep "Product Name"

View network card information

# dmesg | grep-I eth

View operating system version

# lsb_release-a

Background: if you want to add a memory, there is not enough memory on the Mysql server, even if it can be plugged in (there are all slots, there are now four 4G memory and eight slots free.) Do not know that it is not compatible, otherwise it is unstable, if it is not compatible, it will die even worse, this may not be necessary, if production is stopped, there will be no way out. What shall I do? Depends on the brand and model of the memory.

[root@jackxiang ~] # rpm-qa | grep dmidecode

Dmidecode-2.11-2.el6.x86_64

[root@jackxiang ~] # dmidecode

Check the server model and serial number:

[root@jackxiang ~] # dmidecode | grep "System Information"-A9 | egrep "Manufacturer | Product | Serial"

Manufacturer: VMware, Inc.

Product Name: VMware Virtual Platform

Serial Number: VMware-42 18 c8 32 77 c6 ec 16-3f 31 94 e9 d0 34 a6 ac

Linux looks at the number of slots in memory and how many slots have been used. How much memory is each:

[root@jackxiang ~] # dmidecode | grep-A5 "Memory Device" | grep Size | grep-v Range

Size: 4096 MB

Size: 2048 MB

Size: No Module Installed

Size: No Module Installed

How often Linux looks at memory:

[root@localhost htdocs] # dmidecode | grep-A16 "Memory Device" | grep 'Speed'

Speed: 667 MHz (1.5 ns)

Speed: 667 MHz (1.5 ns)

Speed: 667 MHz (1.5 ns)

Speed: 667 MHz (1.5 ns)

Speed: Unknown

The command to view the memory model in linux:

Dmidecode-t memory

View the motherboard model:

Dmidecode | grep-A16 "System Information$"

Memory slot and memory stick:

Dmidecode | grep-A16 "Memory Device$"

Hard disk:

Fdisk-l

Smartctl-a / dev/sda

Network card:

Mii-tool

Dmidecode | grep-P 'Maximum\ maximum memory of several gigabytes of memory is supported

# cat / proc/cpuinfo / / View the number and frequency of cpu

# dmidecode | grep "Product Name" / / View server brand and model

# dmidecode | grep-P-A5 "Memory\ s+Device" | grep Size | grep-v Range / / A total of several slots have been used

Size: 1024 MB / / this slot has 1 gigabyte memory

Size: 1024 MB / / this slot has 1 gigabyte memory

Size: 1024 MB / / this slot has 1 gigabyte memory

Size: 1024 MB / / this slot has 1 gigabyte memory

Size: No Module Installed / / this slot is not in use

Size: No Module Installed / / this slot is not in use

# dmidecode-t 17 / / the number 17 is the parameter of dmidecode. There are other numeric parameters at the end of this article.

Dmidecode 2.7

SMBIOS 2.4 present.

Handle 0x0015, DMI type 17, 27 bytes.

Memory Device

Array Handle: 0x0013

Error Information Handle: Not Provided

Total Width: 72 bits

Data Width: 64 bits

Size: 2048 MB [slot 1 has 1 2GB memory]

Form Factor: DIMM

Set: None

Locator: DIMM00

Bank Locator: BANK

Type: Other

Type Detail: Other

Speed: 667 MHz (1.5 ns)

Manufacturer:

Serial Number: BZACSKZ001

Asset Tag: RAM82

Part Number: MT9HTF6472FY-53EA2

Handle 0x0017, DMI type 17, 27 bytes.

Memory Device

Array Handle: 0x0013

Error Information Handle: Not Provided

Total Width: 72 bits

Data Width: 64 bits

Size: 2048 MB [slot 2 has 1 2GB memory]

Form Factor: DIMM

Set: None

Locator: DIMM10

Bank Locator: BANK

Type: Other

Type Detail: Other

Speed: 667 MHz (1.5 ns)

Manufacturer:

Serial Number: BZACSKZ001

Asset Tag: RAM83

Part Number: MT9HTF6472FY-53EA2

Handle 0x0019, DMI type 17, 27 bytes.

Memory Device

Array Handle: 0x0013

Error Information Handle: Not Provided

Total Width: 72 bits

Data Width: 64 bits

Size: 2048 MB [slot 3 has 1 2GB memory]

Form Factor: DIMM

Set: None

Locator: DIMM20

Bank Locator: BANK

Type: Other

Type Detail: Other

Speed: 667 MHz (1.5 ns)

Manufacturer:

Serial Number: BZACSKZ001

Asset Tag: RAM84

Part Number: MT9HTF6472FY-53EA2

Handle 0x001B, DMI type 17, 27 bytes.

Memory Device

Array Handle: 0x0013

Error Information Handle: Not Provided

Total Width: 72 bits

Data Width: 64 bits

Size: 2048 MB [slot 4 has 1 2GB memory]

Form Factor: DIMM

Set: None

Locator: DIMM30

Bank Locator: BANK

Type: Other

Type Detail: Other

Speed: 667 MHz (1.5 ns)

Manufacturer:

Serial Number: BZACSKZ001

Asset Tag: RAM85

Part Number: MT9HTF6472FY-53EA2

The above is all the contents of the article "how to check cpu, memory and version information in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report