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

Conversation

bfforever
Copy link
Member

No description provided.

Signed-off-by: kangmingfa <[email protected]>
@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hzxuzhonghu for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

netlify bot commented Jun 20, 2024

Deploy Preview for kmesh-net ready!

Name Link
🔨 Latest commit a56f2b5
🔍 Latest deploy log https://app.netlify.com/sites/kmesh-net/deploys/6673d7f009a64f00089624bd
😎 Deploy Preview https://deploy-preview-43--kmesh-net.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -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.

@hzxuzhonghu
Copy link
Member

ping bfforever

```
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.

@@ -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.
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.

## 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.
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:

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

@LiZhenCheng9527
Copy link
Contributor

@bfforever can you update this PR?

@hzxuzhonghu
Copy link
Member

This is now unneeded, we have kmeshctl to set bpf log level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants