Article From:
After the various kinds of Baidu on the Internet, the personal understanding of the copy and paste is summarized. If there is something wrong, we welcome criticism and correction.

uptimeThe command is mainly to look at the CPU load.
[root@localhost ~]# uptime
15:02:17 up 2 days, 3:27, 2 users, load average: 0.00, 0.01, 0.05
15:02:17 For the current time of the system.
up 2days,3:27 The host has run time.
2users The number of user connections (not the number of users landing)
load average System average load, statistics of recent 1, 5, 15 minutes of system load.

Understand the load:
Suppose a single - core processor, if a single lane highway, 0 indicates that there is no traffic on the road at present, and 1 indicates that the capacity of the road is already full, and more than 1 will be blocked. 2, the road has been seriously blocked, with more than doubled traffic.Waiting for the road to go, the road is hard to bear. 3 vehicles that have exceeded the current road 2 times are waiting, and the situation is very urgent.
If it is a multi-core processor. The number of the highway lane * processor.
4Nuclear processor, even 3, is the only way to use 3/4's strength, and 1/4's resources can be used, that is, the state of security.

# Look at CPU Information
cat /proc/cpuinfo

# Total core = physical CPU number X the number of cores per physical CPU.
# The total logical CPU number = physical CPU number X, the number of cores per physical CPU, the number of X hyper threads.

# Look at the number of physical CPU
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# Look at the number of core in each physical CPU (the number of nuclei)
cat /proc/cpuinfo| grep "cpu cores"| uniq

# Look at the number of the logical CPU
cat /proc/cpuinfo| grep "processor"| wc -l
Link of this Article: Uptime understanding

Leave a Reply

Your email address will not be published. Required fields are marked *