From 633aac43f1d095861a708d0b16b97cd2df012bf5 Mon Sep 17 00:00:00 2001 From: yunwei37 <1067852565@qq.com> Date: Sun, 7 May 2023 02:06:11 +0800 Subject: [PATCH] fix vmlinux link --- src/13-tcpconnlat/tcpconnlat.md | 33 ++------------------------------- vmlinux/arm/vmlinux.h | 0 vmlinux/arm64/vmlinux.h | 0 vmlinux/vmlinux.h | 2 +- vmlinux/x86/vmlinux.h | 0 5 files changed, 3 insertions(+), 32 deletions(-) mode change 100644 => 120000 vmlinux/arm/vmlinux.h mode change 100644 => 120000 vmlinux/arm64/vmlinux.h mode change 100644 => 120000 vmlinux/vmlinux.h mode change 100644 => 120000 vmlinux/x86/vmlinux.h diff --git a/src/13-tcpconnlat/tcpconnlat.md b/src/13-tcpconnlat/tcpconnlat.md index 309500b..90309fc 100644 --- a/src/13-tcpconnlat/tcpconnlat.md +++ b/src/13-tcpconnlat/tcpconnlat.md @@ -141,38 +141,9 @@ cleanup: } ``` -### Eunomia 测试 demo - -使用命令行进行追踪: - -```bash -$ sudo build/bin/Release/eunomia run tcpconnlat -[sudo] password for yunwei: -[2022-08-07 02:13:39.601] [info] eunomia run in cmd... -[2022-08-07 02:13:40.534] [info] press 'Ctrl C' key to exit... -PID COMM IP SRC DEST PORT LAT(ms) CONATINER/OS -3477 openresty 4 172.19.0.7 172.19.0.5 2379 0.05 docker-apisix_apisix_1 -3483 openresty 4 172.19.0.7 172.19.0.5 2379 0.08 docker-apisix_apisix_1 -3477 openresty 4 172.19.0.7 172.19.0.5 2379 0.04 docker-apisix_apisix_1 -3478 openresty 4 172.19.0.7 172.19.0.5 2379 0.05 docker-apisix_apisix_1 -3478 openresty 4 172.19.0.7 172.19.0.5 2379 0.03 docker-apisix_apisix_1 -3478 openresty 4 172.19.0.7 172.19.0.5 2379 0.03 docker-apisix_apisix_1 -``` - -还可以使用 eunomia 作为 prometheus exporter,在运行上述命令之后,打开 prometheus 自带的可视化面板: - -使用下述查询命令即可看到延时的统计图表: - -```plain - rate(eunomia_observed_tcpconnlat_v4_histogram_sum[5m]) -/ - rate(eunomia_observed_tcpconnlat_v4_histogram_count[5m]) -``` - -结果: - -![result](tcpconnlat_p.png) +### 编译运行 +TODO ### 总结 通过上面的实验,我们可以看到,tcpconnlat 工具的实现原理是基于内核的TCP连接的跟踪,并且可以跟踪到 tcp 连接的延迟时间;除了命令行使用方式之外,还可以将其和容器、k8s 等元信息综合起来,通过 `prometheus` 和 `grafana` 等工具进行网络性能分析。 diff --git a/vmlinux/arm/vmlinux.h b/vmlinux/arm/vmlinux.h deleted file mode 100644 index 8375718..0000000 --- a/vmlinux/arm/vmlinux.h +++ /dev/null @@ -1 +0,0 @@ -vmlinux_62.h \ No newline at end of file diff --git a/vmlinux/arm/vmlinux.h b/vmlinux/arm/vmlinux.h new file mode 120000 index 0000000..8375718 --- /dev/null +++ b/vmlinux/arm/vmlinux.h @@ -0,0 +1 @@ +vmlinux_62.h \ No newline at end of file diff --git a/vmlinux/arm64/vmlinux.h b/vmlinux/arm64/vmlinux.h deleted file mode 100644 index b302459..0000000 --- a/vmlinux/arm64/vmlinux.h +++ /dev/null @@ -1 +0,0 @@ -vmlinux_601.h \ No newline at end of file diff --git a/vmlinux/arm64/vmlinux.h b/vmlinux/arm64/vmlinux.h new file mode 120000 index 0000000..b302459 --- /dev/null +++ b/vmlinux/arm64/vmlinux.h @@ -0,0 +1 @@ +vmlinux_601.h \ No newline at end of file diff --git a/vmlinux/vmlinux.h b/vmlinux/vmlinux.h deleted file mode 100644 index ba62f1a..0000000 --- a/vmlinux/vmlinux.h +++ /dev/null @@ -1 +0,0 @@ -x86/vmlinux.h \ No newline at end of file diff --git a/vmlinux/vmlinux.h b/vmlinux/vmlinux.h new file mode 120000 index 0000000..0324d0f --- /dev/null +++ b/vmlinux/vmlinux.h @@ -0,0 +1 @@ +x86/vmlinux_601.h \ No newline at end of file diff --git a/vmlinux/x86/vmlinux.h b/vmlinux/x86/vmlinux.h deleted file mode 100644 index b302459..0000000 --- a/vmlinux/x86/vmlinux.h +++ /dev/null @@ -1 +0,0 @@ -vmlinux_601.h \ No newline at end of file diff --git a/vmlinux/x86/vmlinux.h b/vmlinux/x86/vmlinux.h new file mode 120000 index 0000000..b302459 --- /dev/null +++ b/vmlinux/x86/vmlinux.h @@ -0,0 +1 @@ +vmlinux_601.h \ No newline at end of file