Linux system to view CPU, machine model, memory and other information

Linux system to view CPU, machine model, memory and other information

During system maintenance, you may need to check the CPU usage at any time and analyze the system status based on the corresponding information. In Linux, you can use the top command to view CPU usage. For a detailed explanation of the top command, please refer to the article Detailed explanation of using the top command to analyze Linux system performance.

The top command is a commonly used performance analysis tool under Linux. It can display the resource usage of each process in the system in real time, similar to the Windows Task Manager. However, here we mainly introduce how to view CPU information, machine model, memory information, etc. in the Linux system.

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

resource

# free -m # View memory usage and swap area usage# df -h # View the usage of each partition# du -sh <directory name> # View the size of the specified directory# grep MemTotal /proc/meminfo # View the total memory# grep MemFree /proc/meminfo # View the amount of free memory# uptime # View system running time, number of users, and load# cat /proc/loadavg # View system load

Disks and partitions

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

network

# ifconfig # View the properties of all network interfaces # iptables -L # View the firewall settings # route -n # View the 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 <username> # View information about a specified user # last # View user login log # cut -d: -f1 /etc/passwd # View all system users # cut -d: -f1 /etc/group # View all system groups # crontab -l # View scheduled tasks for the current user

Serve

# 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)

# 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 CPUs and know the CPU model) 

# cat /proc/cpuinfo | grep physical | uniq -c 
   4 physical id : 0 
   4 physical id : 1 
(It means there are actually two 4-core CPUs) 

#getconf LONG_BIT 
  32 
(This means that the current CPU is running in 32-bit mode, but it does not mean that the CPU does not support 64-bit) 

# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l 
  8 
(The result is greater than 0, indicating that 64-bit calculation is supported. lm refers to long mode, and if lm is supported, it means 64-bit) 

Let's take a look at the CPU detailed information, but we don't care about most of 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 the current operating system kernel information) 

# cat /etc/issue | grep Linux 
Red Hat Enterprise Linux AS release 4 (Nahant Update 5) 
(View the current operating system release information)

View machine model

# dmidecode | grep "Product Name"

View network card information

# dmesg | grep -i eth

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Linux virtual memory settings tutorial and practice
  • Linux system diagnostics: memory basics in depth
  • How to Check Memory Usage in Linux
  • Why does the Linux system eat up my "memory"?
  • Solve the Linux system v shared memory problem
  • Linux kernel device driver memory management notes
  • Methods for optimizing Oracle database with large memory pages in Linux
  • A brief discussion on Linux virtual memory

<<:  Brief analysis of the MySQL character set causing database recovery errors

>>:  A brief discussion on the whole process of Vue's first rendering

Recommend

How to view the status of remote server files in Linux

As shown below: The test command determines wheth...

Tutorial on how to modify the root password in MySQL 5.7

Version update, the password field in the origina...

Detailed explanation of MySQL 5.7.9 shutdown syntax example

mysql-5.7.9 finally provides shutdown syntax: Pre...

HTML+CSS3 code to realize the animation effect of the solar system planets

Make an animation of the eight planets in the sol...

How to deploy MySQL 5.7 & 8.0 master-slave cluster using Docker

> Deploy MySQL 5.7 cluster master & slave ...

Detailed explanation of Linux inotify real-time backup implementation method

Real-time replication is the most important way t...

The connection between JavaScript and TypeScript

Table of contents 1. What is JavaScript? 2. What ...

Detailed tutorial on installing pxc cluster with docker

Table of contents Preface Preliminary preparation...

How to deal with garbled characters in Mysql database

In MySQL, database garbled characters can general...

Installation and use of Ubuntu 18.04 Server version (picture and text)

1 System Installation Steps OS Version:1804 Image...

An article to give you a deep understanding of Mysql triggers

Table of contents 1. When inserting or modifying ...

js learning notes: class, super and extends keywords

Table of contents Preface 1. Create objects befor...

Detailed explanation of common operations of Docker images and containers

Image Accelerator Sometimes it is difficult to pu...