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 detect Ubuntu version using command line

Method 1: Use the lsb_release utility The lsb_rel...

mysql8.0.11 winx64 manual installation and configuration tutorial

First of all, let me talk to you about my daily l...

JavaScript canvas to achieve code rain effect

This article shares the specific code for canvas ...

How to manually deploy war packages through tomcat9 on windows and linux

The results are different in Windows and Linux en...

HTML form tag tutorial (5): text field tag

<br />This tag is used to create a multi-lin...

jQuery uses the canvas tag to draw the verification code

The <canvas> element is designed for client...

Detailed description of ffmpeg Chinese parameters

FFMPEG 3.4.1 version parameter details Usage: ffm...

Install two MySQL5.6.35 databases under win10

Record the installation of two MySQL5.6.35 databa...

Introduction to HTML_PowerNode Java Academy

What is HTML? HTML is a language used to describe...

Enable sshd operation in docker

First, install openssh-server in docker. After th...

SSM VUE Axios Detailed Explanation

Table of contents How to display SQL log? ? Descr...

How to track users with JS

Table of contents 1. Synchronous AJAX 2. Asynchro...