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

fixed: outputing blank text on linux 4.18 #81 #82

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
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
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Linux Server/Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Kernel Version [e.g. 5.10]
- Version [e.g. 0.1.3-20220313-69c1e0]
**Linux Server/Android (please complete the following information):**

- OS: [e.g. Ubuntu 21.04]
- Arch: [e.g. arm_aarch64]
- Kernel Version: [e.g. 5.10]
- Version: [e.g. 0.1.3-20220313-69c1e0]

**Additional context**
Add any other context about the problem here.
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ import (
"ecapture/cli"
"ecapture/pkg/util/ebpf"
"ecapture/pkg/util/kernel"
"fmt"
"log"
)

const (
BTF_NOT_SUPPORT = "You can compile a no BTF version by youeself with command `make nocore`,Please read Makefile for more info."
)

var (
enableCORE = "true"
)
Expand All @@ -28,11 +33,11 @@ func main() {
// BTF支持情况检测
enable, e := ebpf.IsEnableBTF()
if e != nil {
log.Fatal(err)
log.Fatal(fmt.Sprintf("Can't found BTF config with error:%v.\n"+BTF_NOT_SUPPORT, e))
}
if !enable {
log.Fatal("BTF not support, please check it. shell: cat /boot/config-`uname -r` | grep CONFIG_DEBUG_INFO_BTF \n " +
"Or you can compile a no BTF version with youeself by `make nocore` command,Please read Makefile for more info.")
BTF_NOT_SUPPORT)
}
}

Expand Down