top
top(1) - Linux man page
Overview
The remaining Table of Contents
1 COMMAND-LINE Options
2 FIELDS / Columns
a. DESCRIPTIONS of Fields
b. SELECTING and ORDERING Columns
3 INTERACTIVE Commands
a. GLOBAL Commands
b. SUMMARY Area Commands
c. TASK Area Commands
d. COLOR Mapping
4 ALTERNATE-DISPLAY Mode
a. WINDOWS Overview
b. COMMANDS for Windows
5 FILES
a. SYSTEM Configuration File
b. PERSONAL Configuration File
6 STUPID TRICKS Sampler
a. Kernel Magic
b. Bouncing Windows
c. The Big Bird Window
7 BUGS
8 HISTORY Former top
9 AUTHOR
10 SEE ALSO
1. COMMAND-LINE Options
2. FIELDS / Columns
2a. DESCRIPTIONS of Fields
2b. SELECTING and ORDERING Columns
2c. SUMMARY Area Fields
3. INTERACTIVE Commands
3a. GLOBAL Commands
3b. SUMMARY Area Commands
'1'
Toggle_Single/Separate_Cpu_States -- On/Off
NOTE: 简单说来,键入1,表示我们想要查看: Show CPU Usage on all cores,这是我在阅读haydenjames Linux server performance: Is disk I/O slowing your application? 时发现的,它的视频中展示了CPU-wise usage info。下面是一些对此进行说明的文章:
top %CPU over 100%
下面文章对这个问题进行了解释:
-
askubuntu top command on ubuntu multicore cpu shows cpu usage >100%
-
stackexchange Understanding %CPU while running top command [duplicate]
- superuser Why is the “top” command showing a CPU usage of 799%?
下面是我觉得最好的回答:
A:
%CPU -- CPU Usage : The percentage of your CPU that is being used by the process. By default,
top
displays this as a percentage of a single CPU. On multi-core systems, you can have percentages that are greater than 100%. For example, if 3 cores are at 60% use,top
will show a CPU use of 180%. See here for more information. You can toggle this behavior by hitting Shifti whiletop
is running to show the overall percentage of available CPUs in use.
You can use htop
instead.
To answer your question about how many cores and virtual cores you have:
According to your lscpu
output:
- You have 32 cores (
CPU(s)
) in total. - You have 2 physical sockets (
Socket(s)
), each contains 1 physical processor. - Each processor of yours has 8 physical cores (
Core(s) per socket
) inside, which means you have 8 * 2 = 16 real cores. - Each real core can have 2 threads (
Thread(s) per core
), which means you have real cores * threads = 16 * 2 = 32 cores in total.
So you have 32 virtual cores from 16 real cores.