我在 Ubuntu 系统上遇到了一个问题,在 top 或 htop 等系统监控工具中,CPU 使用率始终显示 100%。但是,当我检查正在运行的进程时,似乎无法确定任何消耗大量 CPU 资源的特定进程。
我尝试使用 top、htop 和 ps 等命令列出正在运行的进程,但没有一个命令显示任何导致 CPU 使用率过高的进程。此外,我还检查了后台任务或服务,但没有发现任何异常。
有人能指出这种行为的可能原因吗?以及我如何才能找出这种情况下 CPU 使用率高的原因?
分销商 ID:Ubuntu 描述:Ubuntu 20.04.6 LTS 发布:20.04 代号:focal
排名前列的结果:
htop的结果:
iotop的结果:
top - 11:44:24 up 7:42, 2 users, load average: 64.00, 64.00, 64.00
Tasks: 655 total, 1 running, 654 sleeping, 0 stopped, 0 zombie
%Cpu(s): 99.9 us, 0.1 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 64294.3 total, 58049.2 free, 4826.7 used, 1418.5 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 58782.7 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2471 root 20 0 6083740 99296 65304 S 1.0 0.2 4:00.85 kubelet
959 root 19 -1 135856 68372 67180 S 0.3 0.1 0:08.48 systemd-journal
1534 root 20 0 760560 40344 30188 S 0.3 0.1 1:11.12 kube-proxy
5509 root 20 0 9896 4556 3224 R 0.3 0.0 0:09.18 top
1 root 20 0 169868 13532 8500 S 0.0 0.0 0:06.53 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H-events_highpri
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
10 root 20 0 0 0 0 I 0.0 0.0 0:02.63 rcu_sched
11 root rt 0 0 0 0 S 0.0 0.0 0:00.09 migration/0
12 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/0
13 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/0:1-rcu_par_gp
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
16 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/1
17 root rt 0 0 0 0 S 0.0 0.0 0:00.39 migration/1
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/1
20 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/1:0H-kblockd
21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
22 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/2
23 root rt 0 0 0 0 S 0.0 0.0 0:00.39 migration/2
24 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/2
26 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0H-kblockd
27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
28 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/3
29 root rt 0 0 0 0 S 0.0 0.0 0:00.39 migration/3
30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/3
32 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/3:0H-kblockd
33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/4
34 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/4
35 root rt 0 0 0 0 S 0.0 0.0 0:00.39 migration/4
36 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/4
37 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0-mm_percpu_wq
38 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0H-events_highpri
1 [||||||||||||||||||||||||100.0%] 17 [||||||||||||||||||||||||100.0%] 33 [||||||||||||||||||||||||100.0%] 49 [||||||||||||||||||||||||100.0%]
2 [||||||||||||||||||||||||100.0%] 18 [||||||||||||||||||||||||100.0%] 34 [||||||||||||||||||||||||100.0%] 50 [||||||||||||||||||||||||100.0%]
3 [||||||||||||||||||||||||100.0%] 19 [||||||||||||||||||||||||100.0%] 35 [||||||||||||||||||||||||100.0%] 51 [||||||||||||||||||||||||100.0%]
4 [||||||||||||||||||||||||100.0%] 20 [||||||||||||||||||||||||100.0%] 36 [||||||||||||||||||||||||100.0%] 52 [||||||||||||||||||||||||100.0%]
5 [||||||||||||||||||||||||100.0%] 21 [||||||||||||||||||||||||100.0%] 37 [||||||||||||||||||||||||100.0%] 53 [||||||||||||||||||||||||100.0%]
6 [||||||||||||||||||||||||100.0%] 22 [||||||||||||||||||||||||100.0%] 38 [||||||||||||||||||||||||100.0%] 54 [||||||||||||||||||||||||100.0%]
7 [||||||||||||||||||||||||100.0%] 23 [||||||||||||||||||||||||100.0%] 39 [||||||||||||||||||||||||100.0%] 55 [||||||||||||||||||||||||100.0%]
8 [||||||||||||||||||||||||100.0%] 24 [||||||||||||||||||||||||100.0%] 40 [||||||||||||||||||||||||100.0%] 56 [||||||||||||||||||||||||100.0%]
9 [||||||||||||||||||||||||100.0%] 25 [||||||||||||||||||||||||100.0%] 41 [||||||||||||||||||||||||100.0%] 57 [||||||||||||||||||||||||100.0%]
10 [||||||||||||||||||||||||100.0%] 26 [||||||||||||||||||||||||100.0%] 42 [||||||||||||||||||||||||100.0%] 58 [||||||||||||||||||||||||100.0%]
11 [||||||||||||||||||||||||100.0%] 27 [||||||||||||||||||||||||100.0%] 43 [||||||||||||||||||||||||100.0%] 59 [||||||||||||||||||||||||100.0%]
12 [||||||||||||||||||||||||100.0%] 28 [||||||||||||||||||||||||100.0%] 44 [||||||||||||||||||||||||100.0%] 60 [||||||||||||||||||||||||100.0%]
13 [||||||||||||||||||||||||100.0%] 29 [||||||||||||||||||||||||100.0%] 45 [||||||||||||||||||||||||100.0%] 61 [||||||||||||||||||||||||100.0%]
14 [||||||||||||||||||||||||100.0%] 30 [||||||||||||||||||||||||100.0%] 46 [||||||||||||||||||||||||100.0%] 62 [||||||||||||||||||||||||100.0%]
15 [||||||||||||||||||||||||100.0%] 31 [||||||||||||||||||||||||100.0%] 47 [||||||||||||||||||||||||100.0%] 63 [||||||||||||||||||||||||100.0%]
16 [||||||||||||||||||||||||100.0%] 32 [||||||||||||||||||||||||100.0%] 48 [||||||||||||||||||||||||100.0%] 64 [||||||||||||||||||||||||100.0%]
Mem[||||||||| 4.72G/62.8G] Tasks: 48, 609 kthr; 1 running
Swp[ 0K/0K] Load average: 64.03 64.01 64.00
Uptime: 07:43:48
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
5618 root 20 0 8640 4576 3332 R 2.0 0.0 0:00.10 htop
2471 root 20 0 5941M 97764 65304 S 0.7 0.1 4:01.61 /usr/bin/kubelet --config=/var/lib/kubelet/config.yaml --container-runtime-endpoint=unix:///r
5509 root 20 0 9896 4556 3224 S 0.7 0.0 0:09.49 top
90 root 20 0 0 0 0 S 0.0 0.0 0:00.06 ksoftirqd/13
1582 root 20 0 5942M 86312 54484 S 0.0 0.1 2:50.38 /usr/bin/containerd-bin/containerd
1534 root 20 0 742M 40344 30188 S 0.0 0.1 1:11.38 /usr/bin/kube-proxy --config=/var/lib/kube-proxy/kube-proxy-config.yaml
1 root 20 0 165M 13532 8500 S 0.0 0.0 0:06.53 /sbin/init maybe-ubiquity
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H-events_highpri
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
10 root 20 0 0 0 0 I 0.0 0.0 0:02.64 rcu_sched
11 root RT 0 0 0 0 S 0.0 0.0 0:00.09 migration/0
12 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/0
13 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/0:1-rcu_par_gp
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
16 root -51 0 0 0 0 S 0.0 0.0 0:00.00 idle_inject/1
17 root RT 0 0 0 0 S 0.0 0.0 0:00.39 migration/1
Total DISK READ: 0.00 B/s | Total DISK WRITE: 111.91 K/s
Current DISK READ: 0.00 B/s | Current DISK WRITE: 220.21 K/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
871 be/3 root 0.00 B/s 7.22 K/s 0.00 % 3.50 % [jbd2/dm-1-8]
959 be/3 root 0.00 B/s 101.08 K/s 0.00 % 0.03 % systemd-journald
4378 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.01 % [kworker/u128:1-events_power_efficient]
1598 be/4 root 0.00 B/s 3.61 K/s 0.00 % 0.00 % nginx: worker process
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init maybe-ubiquity
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_gp]
4 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_par_gp]
6 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/0:0H-events_highpri]
8 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [mm_percpu_wq]
9 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
10 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_sched]
11 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
12 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [idle_inject/0]
13 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/0:1-rcu_par_gp]
14 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/0]
15 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/1]
16 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [idle_inject/1]
17 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/1]
18 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/1]
20 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/1:0H-kblockd]
21 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/2]
22 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [idle_inject/2]
23 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/2]
24 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/2]
26 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/2:0H-kblockd]
27 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/3]
28 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [idle_inject/3]
29 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/3]
30 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/3]
32 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/3:0H-kblockd]
33 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/4]
34 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [idle_inject/4]
35 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/4]
36 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/4]
37 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/4:0-mm_percpu_wq]
38 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/4:0H-events_highpri]
39 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/5]
40 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [idle_inject/5]