Skip to content

Commit 5b07c1c

Browse files
docs:补充系统函数调用追踪和 Docker 镜像历史查看提示
- 在 bcc 文档中添加了跟踪指定进程系统函数调用的示例- 在 Docker 文档中增加了 docker history 命令的说明- 在性能工具文档中解释了 pidstat 中的 %wait 字段含义
1 parent d71fc02 commit 5b07c1c

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

containerd/docker.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ image::containerd/c8116066bdbf295a7c9fc25b87755dfe.jpg[docker]
4747
|**`docker stats`**|查看容器的CPU等资源使用情况。
4848
|**`docker logs`**|查看容器的日志。
4949
|**`docker exec`**|进入到容器内部执行命令
50+
|**`docker history`**|查看镜像的打包过程
5051
|**`docker volume`**|查看docker生成的持久化挂载卷,这些卷能保证容器重启之后数据依然存在
5152
|===
5253

eBPF/bcc.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,6 +2301,14 @@ PID COMM FUNC -
23012301

23022302
这里,`::sys_execve` 指定了你想探查内核中的 `sys_execve` 函数,并打印第一个参数,即被执行的命令。
23032303

2304+
**跟踪指定进程系统函数调用**
2305+
2306+
[source,bash]
2307+
----
2308+
# 指定 进程 ID 来跟踪进程的系统调用 open
2309+
sudo strace -p 1 -e trace=open
2310+
----
2311+
23042312
**条件过滤**
23052313

23062314
若想查找系统中较大的读取操作,可以通过指定第三个参数(要读取的字节数)大于 20000 的条件来实现:

linux/performance-tools.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ sar -n TCP 1 5
725725

726726
按照进程或者线程打印CPU使用量,包括用户时间和系统时间的细分
727727

728+
> 这里的wait并不是I/O wait,和top里面的不一样,这里面的wait是等待执行的时间, %wait Percentage of CPU spent by the task while waiting to run
729+
728730
[source, bash]
729731
----
730732
# pidstat 1

0 commit comments

Comments
 (0)