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 to check CPU, machine model, memory and other information in Linux system

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

Share

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

Editor to share with you how to view CPU, machine model, memory and other information in the Linux system. I hope you will get something after reading this article. Let's discuss it together.

During system maintenance, it may be necessary to check the CPU utilization rate at any time, and analyze the system status according to the corresponding information. In linux, you can view CPU usage through the top command. For a detailed description of the top command, see this article on using the top command to analyze linux system performance.

Top command is a commonly used performance analysis tool under Linux, which can display the resource utilization of each process in the system in real time, similar to the task manager of Windows; but here we mainly introduce how the linux system views CPU information, machine model, memory information and so on.

System

# uname-a # View kernel / operating system / CPU information # head-n 1 / etc/issue # View operating system version # cat / proc/cpuinfo # View CPU information # hostname # View computer name # lspci-tv # list all PCI devices # lsusb-tv # list all USB devices # lsmod # list loaded kernel modules # env # View environment variables

Resources

# free-m # View memory usage and switch area usage # df-h # View partition usage # du-sh # View the size of a specified directory # grep MemTotal / proc/meminfo # View Total memory # grep MemFree / proc/meminfo # View Free memory # uptime # View system Runtime, number of users, load # cat / proc/loadavg # View system load

Disks and partitions

# mount | column-t # View the status of mounted partitions # fdisk-l # View all partitions # swapon-s # View all swap partitions # hdparm-I / dev/hda # View disk parameters (for IDE devices only) # dmesg | grep IDE # View the detection status of IDE devices at startup

The network

# ifconfig # View properties of all network interfaces # iptables-L # View firewall settings # route-n # View routing table # netstat-lntp # View all listening ports # netstat-antp # View all established connections # netstat-s # View Network Statistics

Process

# ps-ef # View all processes # top # display process status in real time

User

# w # View active users # id # View specified user information # last # View user login log # cut-d:-F1 / etc/passwd # View all users of the system # cut-d:-F1 / etc/group # View all groups of the system # crontab-l # View the current user's scheduled tasks

Service

# chkconfig-- list # list all system services # chkconfig-- list | grep on # list all started system services

program

# rpm-qa # View all installed packages

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 (indicating that it is actually two four-core CPU) # getconf LONG_BIT 32 (indicating that CPU is currently running in 32bit mode However, it does not mean that CPU does not support 64bit) # cat / proc/cpuinfo | grep flags | grep'lm'| wc-L8 (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 has finished reading this article. I believe you have a certain understanding of "how to check CPU, machine model, memory and other information in Linux system". If you want to know more about it, please follow the industry information channel. Thank you for reading!

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