by Devin Yang
(This article was automatically translated.)

Published - 1 year ago ( Updated - 1 year ago )

CPU data
Check the CPU, check the model name and the number of cpus (several cores)

cat /proc/cpuinfo |grep 'model name'|tail -n1
cat /proc/cpuinfo |grep 'model name'|wc -l

Operation screen

# cat /proc/cpuinfo |grep 'model name'|tail -n1
model name	: Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz
# cat /proc/cpuinfo |grep 'model name'|wc -l
24

If there is an lscpu command, it is desirable to update the clear information

lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          24
On-line CPU(s) list:             0-23
Thread(s) per core:              2
Core(s) per socket:              12
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           85
Model name:                      Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz
Stepping:                        7
底下....略.....

Memory
check how much memory

grep MemTotal /proc/meminfo
egrep 'MemTotal|MemFree|MemAvailable' /proc/meminfo

Actual operation screen

$ egrep 'MemTotal|MemFree|MemAvailable' /proc/meminfo
MemTotal:       82024272 kB
MemFree:        51008940 kB
MemAvailable:   74909208 kB

If there is a free command, the following command can be used to make it clearer

$free -h
               total        used        free      shared  buff/cache   available
Mem:            78Gi       4.1Gi        48Gi       1.8Gi        25Gi        71Gi
Swap:          8.0Gi          0B       8.0Gi


hard disk space
The disk can be detected with the df command

df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              7.9G  6.6M  7.9G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G   35G   58G  38% /
tmpfs                               40G     0   40G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  248M  1.6G  14% /boot
/dev/sda1                          1.1G  5.3M  1.1G   1% /boot/efi
tmpfs                              7.9G  4.0K  7.9G   1% /run/user/0
tmpfs                              7.9G  4.0K  7.9G   1% /run/user/1000

If you want a beautiful picture, we can also use neofetch to quickly check, usually need to be installed separately.

E.g:
Manjaro Linux will look like this

Tags: bash cli

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


terminal,shortcuts,bash

Terminal Hotkey Raiders

This article introduces and sorts out some hotkeys of the terminal, let’s see what you don’t know? Come and try.

nvidia,gpu,cli

Find out what graphics card is used in the computer

What command can be used to check graphics card information? nvidia-smi

docker,cli

Docker container formatted display

I think if you want to write some automation functions, it may be useful to be able to format the output container content. The following are some reference examples of Docker container formatting and display instructions