Skip to content

Commit 1284a9b

Browse files
authored
docs: update docs (#282)
1 parent 237c9e3 commit 1284a9b

10 files changed

+66
-45
lines changed

README.md

+19-18
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,20 @@
2626

2727
## Table of Contents
2828

29-
- [What is kyanos](#-what-is-kyanos)
30-
- [Examples](#-examples)
31-
- [Requirements](#-requirements)
32-
- [How to get kyanos](#-how-to-get-kyanos)
33-
- [Documentation](#-documentation)
34-
- [Usage](#-usage)
35-
- [How to build](#-how-to-build)
36-
- [Feedback and Contributions](#-feedback-and-contributions)
37-
- [Special Thanks](#-special-thanks)
38-
- [Contacts](#%EF%B8%8F-contacts)
29+
- [kyanos](#kyanos)
30+
- [Table of Contents](#table-of-contents)
31+
- [What is kyanos](#what-is-kyanos)
32+
- [Examples](#examples)
33+
- [❗ Requirements](#-requirements)
34+
- [🎯 How to get kyanos](#-how-to-get-kyanos)
35+
- [📝 Documentation](#-documentation)
36+
- [⚙ Usage](#-usage)
37+
- [🏠 How to build](#-how-to-build)
38+
- [Roadmap](#roadmap)
39+
- [🤝 Feedback and Contributions](#-feedback-and-contributions)
40+
- [🙇‍ Special Thanks](#-special-thanks)
41+
- [🗨️ Contacts](#️-contacts)
42+
- [Star History](#star-history)
3943

4044
## What is kyanos
4145

@@ -206,14 +210,12 @@ The Kyanos Roadmap shows the future plans for Kyanos. If you have feature
206210
requests or want to prioritize a specific feature, please submit an issue on
207211
GitHub.
208212

209-
_1.5.0_
213+
_1.6.0_
210214

211-
1. Support for openssl 3.4.0
212-
2. Support for parsing ipip packets
213-
3. Support for filtering data based on process name
214-
4. Support for postgresql protocol parsing
215-
5. Support for kafka protocol parsing
216-
6. Full support for ipv6
215+
1. Support for postgresql protocol parsing.
216+
2. Support for HTTP2 protocol parsing.
217+
3. Support for DNS protocol parsing.
218+
4. Support for GnuTLS.
217219

218220
## 🤝 Feedback and Contributions
219221

@@ -235,7 +237,6 @@ projects:
235237

236238
For more detailed inquiries, you can use the following contact methods:
237239

238-
- **Twitter:** [https://x.com/kyanos_github](https://x.com/kyanos_github)
239240
- **My Email:** [[email protected]](mailto:[email protected])
240241
- **My Blog:** [http://blog.deadlock.cloud](http://blog.deadlock.cloud/)
241242

README_CN.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@
2121

2222
## Table of Contents
2323

24-
- [What is Kyanos](#-what-is-kyanos)
25-
- [Examples](#-examples)
26-
- [Requirements](#-requirements)
27-
- [How to get kyanos](#-how-to-get-kyanos)
28-
- [Documentation](#-documentation)
29-
- [Usage](#-usage)
30-
- [How to build](#-how-to-build)
31-
- [Feedback and Contributions](#-feedback-and-contributions)
32-
- [Special Thanks](#-special-thanks)
33-
- [Contacts](#%EF%B8%8F-contacts)
24+
- [Table of Contents](#table-of-contents)
25+
- [🦜 What is kyanos](#-what-is-kyanos)
26+
- [🌰 Examples](#-examples)
27+
- [❗ Requirements](#-requirements)
28+
- [📝 Documentation](#-documentation)
29+
- [🎯 How to get kyanos](#-how-to-get-kyanos)
30+
- [⚙ Usage](#-usage)
31+
- [🏠 How to Build](#-how-to-build)
32+
- [Roadmap](#roadmap)
33+
- [🤝 Feedback and Contributions](#-feedback-and-contributions)
34+
- [🙇‍ Special Thanks](#-special-thanks)
35+
- [🗨️ Contacts](#️-contacts)
36+
- [Star History](#star-history)
3437

3538
## 🦜 What is kyanos
3639

@@ -173,14 +176,12 @@ sudo ./kyanos watch
173176

174177
Kyanos 的 Roadmap 展示了 Kyanos 未来的计划,如果你有功能需求,或者想提高某个特性的优先级,请在 GitHub 上提交 issue。
175178

176-
_1.5.0_
179+
_1.6.0_
177180

178-
1. 支持 openssl 3.4.0
179-
2. 支持解析 ipip 包
180-
3. 支持根据 process name 过滤数据
181-
4. 支持 postgresql 协议解析
182-
5. 支持 kafka 协议解析
183-
6. 完全支持 ipv6
181+
1. 支持 postgresql 协议解析。
182+
2. 支持 HTTP2 协议。
183+
3. 支持 DNS 协议。
184+
4. 支持 GnuTLS 库解析加密流量。
184185

185186
## 🤝 Feedback and Contributions
186187

docs/cn/faq.md

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ https://github.com/aquasecurity/btfhub-archive/
5353

5454
确认你想监控的协议不是 HTTP2,因为 kyanos 目前尚未支持。
5555

56+
## 为什么抓取到的请求数量明显少于真实的请求数量?
57+
在大流量的情况下 kyanos 可能抓取不到完整的请求数据,检查 `/tmp` 目录下的 kyanos 日志,如果出现 `[dataReader] lost xx syscall data events` 的日志说明正是这种情况。
58+
59+
如果想尽可能的抓取请求可以加上 `--trace-dev-event=false --trace-socket-data` 这个选项,加上该选项后不会抓取数据经过网卡和`socket buffer`的事件,将所有处理能力用于解析 syscall 数据上(目前通过 syscall 数据解析请求和响应)
60+
5661
## 运行后终端表格颜色不正确(比如无法选择表格中的记录)
5762

5863
![kyanos missing color](/missing-color.png)

docs/cn/how-to-add-a-new-protocol.md

+4
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ type ProtocolFilter interface {
233233
| `FilterByRequest` | 是否根据请求进行过滤。 |
234234
| `FilterByResponse` | 是否根据响应进行过滤。 |
235235

236+
另外需要在 `cmd/watch.go` 里的 `supportedProtocols` 需要添加对应的协议名称。
237+
236238
## Step.5-注册协议解析器
237239

238240
在你写的模块下增加 init 函数,将其写入到 `ParsersMap` 里,例如:
@@ -245,6 +247,8 @@ func init() {
245247
}
246248
```
247249

250+
最后在 `bpf/common.go` 里的 `ProtocolNamesMap` 增加对应的协议名称翻译。
251+
248252
## Step.6-添加测试
249253

250254
### 添加 e2e 测试

docs/cn/json-output.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# JSON 输出格式 <Badge type="tip" text="1.5.0" />
1+
# JSON 输出格式 <Badge type="tip" text="preview" />
22

33
本文档描述了使用 kyanos 的 `--json-output` 参数时的 JSON 输出格式。
44

docs/cn/watch.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ kyanos 支持根据 IP 端口等三/四层信息过滤,可以指定以下选
130130
| 请求 Key | `keys` | `--keys foo,bar ` 只观察请求 key 为 foo 和 bar |
131131
| 请求 key 前缀 | `key-prefix` | `--method foo:bar ` 只观察请求的 key 前缀为 foo\: bar |
132132

133-
#### RocketMQ 协议过滤 <Badge type="tip" text="1.5.0" />
133+
#### RocketMQ 协议过滤 <Badge type="tip" text="preview" />
134134

135135
| 过滤条件 | 命令行 flag | 示例 |
136136
| :------- | :-------------- | :---------------------------------------------------------------------- |
@@ -144,14 +144,14 @@ kyanos 支持根据 IP 端口等三/四层信息过滤,可以指定以下选
144144
> [这里](https://github.com/apache/rocketmq/blob/develop/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/LanguageCode.java)
145145
146146

147-
#### Kafka 协议过滤 <Badge type="tip" text="1.5.0" />
147+
#### Kafka 协议过滤 <Badge type="tip" text="preview" />
148148

149149
| 过滤条件 | 命令行 flag | 示例 |
150150
| :------- | :-------------- | :---------------------------------------------------------------------- |
151151
| 主题名称 | `topic` | `--topic quickstart-events` |
152152
| 生产者 | `producer` | `--producer` 观察 producer 的请求,指定topic时有用,默认为true |
153153
| 消费者 | `consumer` | `--consumer` 观察 consumer 的请求,指定topic时有用,默认为true |
154-
| 请求代码 | `apikeys` | `--apikeys 10,11` 只观察Kafka APIKEY为 10 和 11 的 |
154+
| API Key | `apikeys` | `--apikeys 10,11` 只观察Kafka APIKEY为 10 和 11 的 |
155155

156156
> 有关API Key的含义和值,请参阅
157157
> [这里](https://kafka.apache.org/protocol#protocol_api_keys)
@@ -168,7 +168,7 @@ kyanos 支持根据 IP 端口等三/四层信息过滤,可以指定以下选
168168
> 所有上述选项均可以组合使用,比如:`./kyanos watch redis --keys foo,bar --remote-ports 6379 --pid 12345`
169169
170170

171-
## JSON 输出 <Badge type="tip" text="1.5.0" />
171+
## JSON 输出 <Badge type="tip" text="preview" />
172172

173173
如果你需要以编程方式处理采集到的数据,可以使用 `--json-output`
174174
参数将结果输出为 JSON 格式:

docs/faq.md

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ copying to the Socket buffer and being read by the process.
7373
Make sure the protocol you want to monitor is not HTTP2, as kyanos does not
7474
currently support it.
7575

76+
## Why is the number of captured requests significantly less than the actual number of requests?
77+
78+
In high-traffic situations, kyanos may not be able to capture complete request data. Check the kyanos logs in the `/tmp` directory. If you see logs like `[dataReader] lost xx syscall data events`, it indicates this situation.
79+
80+
If you want to capture as many requests as possible, you can add the `--trace-dev-event=false --trace-socket-data` option. With this option, events of data passing through the network card and `socket buffer` will not be captured, and all processing power will be used to parse syscall data (currently, requests and responses are parsed through syscall data).
81+
7682
## Incorrect terminal table colors after running (e.g., unable to select records in the table)
7783

7884
![kyanos missing color](/missing-color.png)

docs/how-to-add-a-new-protocol.md

+4
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ type ProtocolFilter interface {
272272
| `FilterByRequest` | Filters based on requests. |
273273
| `FilterByResponse` | Filters based on responses. |
274274

275+
Additionally, you need to add the corresponding protocol name to `supportedProtocols` in `watch.go`.
276+
275277
## Step.5-Register Protocol Parser
276278

277279
Add an init function in your module to write it into the `ParsersMap`, for
@@ -285,6 +287,8 @@ func init() {
285287
}
286288
```
287289

290+
Finally, add the corresponding protocol name translation to `ProtocolNamesMap` in `common.go`
291+
288292
## Step.6-Add e2e Tests
289293

290294
Add e2e tests for the corresponding protocol in the testdata directory. You can

docs/json-output.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# JSON Output Format <Badge type="tip" text="1.5.0" />
1+
# JSON Output Format <Badge type="tip" text="preview" />
22

33
This document describes the JSON output format when using kyanos with the
44
`--json-output` flag.

docs/watch.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Here are the options available for filtering by each protocol:
148148
| Request Key | `keys` | `--keys foo,bar` <br> Only observe requests with the keys `foo` and `bar`. |
149149
| Request Key Prefix | `key-prefix` | `--key-prefix foo:bar` <br> Only observe requests with keys that have the prefix `foo:bar`. |
150150

151-
#### RocketMQ Protocol Filtering <Badge type="tip" text="1.5.0" />
151+
#### RocketMQ Protocol Filtering <Badge type="tip" text="preview" />
152152

153153
| Filter Condition | Command Line Flag | Example |
154154
| ---------------- | ----------------- | ------------------------------------------------------------------------------------------ |
@@ -161,14 +161,14 @@ Here are the options available for filtering by each protocol:
161161
> For more supported languages, please refer to
162162
> [here](https://github.com/apache/rocketmq/blob/develop/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/LanguageCode.java).
163163
164-
#### Kafka Protocol Filtering <Badge type="tip" text="1.5.0" />
164+
#### Kafka Protocol Filtering <Badge type="tip" text="preview" />
165165

166166
| Filter Condition | Command Line Flag | Example |
167167
| :--------------- | :---------------- | :------ |
168168
| Topic Name | `topic` | `--topic quickstart-events` |
169169
| Producer | `producer` | `--producer` Observe producer requests, useful when specifying a topic, default is true |
170170
| Consumer | `consumer` | `--consumer` Observe consumer requests, useful when specifying a topic, default is true |
171-
| Request Code | `apikeys` | `--apikeys 10,11` Only observe Kafka APIKEYs 10 and 11 |
171+
| API Keys | `apikeys` | `--apikeys 10,11` Only observe Kafka APIKEYs 10 and 11 |
172172

173173

174174
> For the meaning and values of API Keys, refer to
@@ -194,7 +194,7 @@ This flexibility allows you to tailor your traffic capture to your specific
194194
needs, ensuring you gather only the most relevant request-response data.
195195

196196

197-
## JSON Output <Badge type="tip" text="1.5.0" />
197+
## JSON Output <Badge type="tip" text="preview" />
198198

199199
If you need to process the captured data programmatically, you can use the
200200
`--json-output` flag to output the results in JSON format:

0 commit comments

Comments
 (0)