In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to view hardware information in the Linux system. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
1, view the disk
The code is as follows:
Df-h
2, check the memory size
The code is as follows:
Freefree [- m | g]
Display memory by MB,GB
The code is as follows:
Vmstat
3. Check the cpu
The code is as follows:
Cat / proc/cpuinfo
Only look at the number of cpu grep "model name" / proc/cpuinfo | wc-l
4. Check the system memory
The code is as follows:
Cat / proc/meminfo
5. Check the status of each process
The code is as follows:
Cat / proc/5346/status 5347 is pid
6, view the load
W
Uptime
7 to view the overall status of the system
Top
Explanation of some of the final output information:
Load average: 0.09, 0.05, 0.01
The three numbers represent the average system load for different time periods (one minute, five minutes, and fifteen minutes), and of course, the smaller the number, the better. the rule of "the number of cores is the load": in multi-core processing, your system average should not be higher than the total number of processor cores.
The memory used by a process can be top, with three columns of VIRT RES SHR, indicating the memory used by the process. VIRT identifies the total amount of memory that the process can use, including the actual memory used by the process, the mapped files, the memory shared with other processes, and so on. RES identifies the actual amount of memory consumed by the process. SHR identifies the memory and library size that can be shared with other processes.
8, performance monitoring sar command
The sar-u output displays CPU information. The-u option is the default option for sar. The output shows CPU usage as a percentage
CPU
CPU number
% user
Time it takes to run a process in user mode
% nice
The time it takes to run a normal process
% system
The time taken to run a process in kernel mode (system)
% iowait
The amount of time that the processor waits for the CPU O to complete when there is no process executing on it
% idle
There is no time for the process to execute on the CPU
Sar 5 10 sar takes 10 samples at intervals of 5 seconds
Sar-u-p ALL 55 points cup display
The code is as follows:
Sar-n {DEV | EDEV | NFS | NFSD | SOCK | ALL}
Sar provides six different syntax options to display network information. The-n option uses six different switches: DEV | EDEV | NFS | NFSD | SOCK | ALL. DEV displays network interface information, EDEV displays statistics about network errors, NFS statistics about active NFS clients, NFSD statistics NFS server information, SOCK displays socket information, ALL displays all five switches. They can be used alone or together.
Meaning of parameters of sar-n DEV
IFACE
LAN interface
Rxpck/s
Packets received per second
Txpck/s
Packets sent per second
Rxbyt/s
Bytes received per second
Txbyt/s
Bytes sent per second
Rxcmp/s
Compressed packets received per second
Txcmp/s
Compressed packets sent per second
Rxmcst/s
Multicast packets received per second
9, view command history (with timestamp)
Export HISTTIMEFORMAT='%F% T'; history | more
10, view folders and file sizes
The code is as follows:
Du-h-max-depth=0 dm
View dm directory size
The code is as follows:
Du-h-max-depth=1 dm
Check the size of the dm directory and the size of each dm file folder
The code is as follows:
Du-h-max-depth=0
View the current folder size
About how to view the hardware information in the Linux system to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.