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 add default time to a field in MySQL

Date type differences and uses MySQL has five dat...

Native js to realize bouncing ball

On a whim, I wrote a case study of a small ball b...

Detailed summary of web form submission methods

Let's first look at several ways to submit a ...

Detailed explanation of Javascript closures and applications

Table of contents Preface 1. What is a closure? 1...

Turn off the AutoComplete function in the input box

Now we can use an attribute of input called autoco...

CentOS 7.9 installation and configuration process of zabbix5.0.14

Table of contents 1. Basic environment configurat...

Mysql 5.6.37 winx64 installation dual version mysql notes

If MySQL version 5.0 already exists on the machin...

JS array deduplication details

Table of contents 1 Test Cases 2 JS array dedupli...

MySql 8.0.11-Winxp64 (free installation version) configuration tutorial

1. Unzip the zip package to the installation dire...

How to deploy SpringBoot project using Docker

The development of Docker technology provides a m...

Implementation of CSS heart-shaped loading animation source code

Without further ado, let me show you the code. Th...

uniapp realizes the recording upload function

Table of contents uni-app Introduction HTML part ...

Tutorial on deploying nginx+uwsgi in Django project under Centos8

1. Virtual environment virtualenv installation 1....