ps -ef|grep 容器Id
1
2
3
|
[root
@wentao
-
2
order]# ps -ef|grep 3a61cb3fd4f6
root
7358
12956
0
09
:
14
?
00
:
00
:
00
containerd-shim -namespace moby -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/moby/3a61cb3fd4f64f6fed464ca6c7185c5138c9256ac8ceb049b9527272573e994d -address /run/containerd/containerd.sock -containerd-binary /usr/bin/containerd -runtime-root /var/run/docker/runtime-runc
root
7893
5652
0
09
:
19
pts/
0
00
:
00
:
00
grep --color=auto 3a61cb3fd4f6
|
top -p 7358(pid)
1
2
3
4
5
6
7
8
9
|
[root
@wentao
-
2
order]# top -p
7358
top -
09
:
22
:
14
up
103
days,
18
:
13
,
2
users, load average:
0.04
,
0.09
,
0.12
Tasks:
1
total,
0
running,
1
sleeping,
0
stopped,
0
zombie
%Cpu(s):
0.8
us,
0.3
sy,
0.0
ni,
98.9
id,
0.0
wa,
0.0
hi,
0.0
si,
0.0
st
KiB Mem :
8010424
total,
170620
free,
7303264
used,
536540
buff/cache
KiB Swap:
0
total,
0
free,
0
used.
369860
avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7358
root
20
0
10724
3744
2656
S
0.0
0.0
0
:
00.05
containerd-shim
|
參數說明:
PID:進程的ID
USER:進程所有者
PR:進程的優先級別,越小越優先被執行
NInice:值
VIRT:進程占用的虛擬內存
RES:進程占用的物理內存
SHR:進程使用的共享內存
S:進程的狀態。S表示休眠,R表示正在運行,Z表示僵死狀態,N表示該進程優先值為負數
%CPU:進程占用CPU的使用率
%MEM:進程使用的物理內存和總內存的百分比
TIME+:該進程啟動后占用的總的CPU時間,即占用CPU使用時間的累加值。
COMMAND:進程啟動命令名稱