Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bpf log doc. #43

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions content/en/docs/setup/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,30 @@ Content-Length: 0

Note: 10.244.0.21 is the IP of httpbin

## Enable dataplane bpf log
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bfforever Would you update the design as we talked, if so this need update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update next week.


For current kmesh ebpf log, if kernel version is < 5.13, it only supports bpf log in tracepipe, else will support dump bpf log to userspace in kmesh daemon process.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Kmesh uniformly, with the first letter capitalized.

So in order to print log in kemsh dataplane, enable different log level for your need. Support 4 bpf log level:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
So in order to print log in kemsh dataplane, enable different log level for your need. Support 4 bpf log level:
So in order to print log in Kmesh dataplane, enable different log level for your need. Support 4 bpf log level:

```
BPF_LOG_ERR = 0,
BPF_LOG_WARN = 1,
BPF_LOG_INFO = 2,
BPF_LOG_DEBUG = 3,
```
Currently default bpf log level is BPF_LOG_ERR, we can change bpf log level in every node by using below command, for example, 3 represents enable BPF_LOG_DEBUG log level:

```
kubectl exec ds/kmesh -n kmesh-system -- curl -s localhost:15200/debug/bpfLogLevel/3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use a more readable format? like curl -s localhost:15200/debug/bpfLogLevel?level=debug

```
Then, if kernel version < 5.13, we could see the bpf log use command:
```
cat /sys/kernel/debug/tracing/trace_pipe
```
Otherwise, we can view the bpf log in kemsh daemon process.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Otherwise, we can view the bpf log in kemsh daemon process.
Otherwise, we can view the bpf log in Kmesh daemon process.

```
kubectl logs -f -n kmesh-system ds/kmesh
```

## Clean Up

If you don't want to use Kmesh to govern the application anymore, you can delete the labels on the namespace and restart the pod.
Expand Down