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:
|
<<: Brief analysis of the MySQL character set causing database recovery errors
>>: A brief discussion on the whole process of Vue's first rendering
As shown below: The test command determines wheth...
Version update, the password field in the origina...
mysql-5.7.9 finally provides shutdown syntax: Pre...
Make an animation of the eight planets in the sol...
> Deploy MySQL 5.7 cluster master & slave ...
Real-time replication is the most important way t...
Table of contents 1. What is JavaScript? 2. What ...
0x00 Introduction WordPress is the most popular C...
Table of contents Preface Preliminary preparation...
Copy code The code is as follows: <!-- Prevent...
In MySQL, database garbled characters can general...
1 System Installation Steps OS Version:1804 Image...
Table of contents 1. When inserting or modifying ...
Table of contents Preface 1. Create objects befor...
Image Accelerator Sometimes it is difficult to pu...