-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add bpf log doc. #43
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -132,6 +132,30 @@ Content-Length: 0 | |||||
|
||||||
Note: 10.244.0.21 is the IP of httpbin | ||||||
|
||||||
## Enable dataplane bpf log | ||||||
|
||||||
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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use |
||||||
So in order to print log in kemsh dataplane, enable different log level for your need. Support 4 bpf log level: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
``` | ||||||
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 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we use a more readable format? like |
||||||
``` | ||||||
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. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
``` | ||||||
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. | ||||||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.