- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有写入 trace_pipe 文件的 BPF 程序,即使程序正确执行,我也无法从该文件中读取数据。
每当我尝试 cat /sys/kernel/debug/tracing/trace_pipe
,进程卡住,没有任何输出显示。
我已经通过运行手动安装了 debugfs:mount -t debugfs none /sys/kernel/debug
当我尝试 cat、tail、vi 或以某种方式读取此文件的内容时,结果是相同的。
即使在我挂载 debugfs 之后,“trace_pipe”文件也无法读取,所以我认为这与我的 BPF 代码执行无关。
这个文件根本不可读,我想了解我应该怎么做才能读取它。
我可以确认 debugfs 已正确安装,并且该文件确实存在:
我很感激有关如何阅读此文件的任何提示。
最佳答案
所以这只是你的 eBPF 程序中的一个错误。从您的链接:
int my_pid = 0;
SEC("tp/syscalls/sys_enter_write")
int handle_tp(void *ctx)
{
int pid = bpf_get_current_pid_tgid() >> 32;
if (pid != my_pid)
return 0;
bpf_printk("BPF triggered from PID %d.\n", pid);
return 0;
}
有
if (pid != my_pid) return 0;
, 与
my_pid = 0
, 意味着您每次收集的 PID 为非 0 时退出 - 这几乎一直都是。所以你的程序提前退出,你没有机会执行对
bpf_printk()
的调用。并将数据发送到跟踪管道。
关于Linux 跟踪/trace_pipe 文件不可读 (debugfs),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72447692/
我正在尝试在 ath9k 内核驱动程序模块中启用调试。 由于调试使用debugfs,我需要挂载debugfs。但是人们和互联网建议安装命令有点不同: # (Note) mount usage: mou
所以我正在创建一个网络命名空间: % uname -r 4.15.0-rc8+ % ip netns add ns1 % ip netns exec ns1 mount 在这一点上,我希望看到所有与我
当我尝试在 Macbook pro(10.6.8) 上使用 debugfs 时,我得到 -bash: debugfs: command not found 然后我试着看看我的路径 echo $PATH
我正在实现一个内核模块。使用几种技术。其中之一是对不同的模块变量进行读/写。除了模块中的列表之外,我能够读取/写入所有变量。链表: static struct node { s
我尝试对 debugfs 文件执行写入功能。我希望我可以使用 echo "hello">/sys/kernel/debugfs/mydir/myfile 将字符串写入文件。并使用 echo "worl
我有写入 trace_pipe 文件的 BPF 程序,即使程序正确执行,我也无法从该文件中读取数据。 每当我尝试 cat /sys/kernel/debug/tracing/trace_pipe ,进
我已经成功地在匹配路径中创建了一个 dentry,但现在我该如何在那里写呢? struct dentry* log_dir = debugfs_create_dir ("my_module", NUL
我需要使用没有任何 sysfs/debugfs 的系统(这是一个强烈的要求,无法更改)。 我需要了解如何在没有此文件系统的情况下设置 Linux。 例如,在配置各种 omap PM(电源管理功能)时,
我正在查看 SystemC 的源代码,看到有这样的东西: #define DEBUGF \ if (0) std::cout << "sc_cor_pthread.cpp(" << __LIN
我正在查看一个 Linux 内核配置文件,其中启用了 function_trace 但禁用了 debugfs。如果我将这个内核加载到目标上有什么办法,我可以使用 function_tracer 吗?如
我正在尝试使 Spring + Spring Data + Log4J2 堆栈工作。不幸的是,在 My Glassfish 4.1 Server 上部署该工件时,出现以下错误: org.springf
我正在尝试使 Spring + Spring Data + Log4J2 堆栈工作。不幸的是,在 My Glassfish 4.1 Server 上部署该工件时,出现以下错误: org.springf
debugfs api 例如debugfs_create_dir说 If debugfs is not enabled in the kernel, the value -ENODEV will be
今天我尝试使用 Junit 来尝试与 hibernate 的集成测试。我对集成测试很陌生,所以我希望我做错了什么。我在 githhub 上找到了这个例子: example hibernate juni
来自 debugfs.txt , mount debugfs 命令是这样的: mount -t debugfs none /sys/kernel/debug 这个语句中none的作用是什么? 最佳答案
我在使用 hibernate 5 部署 web 应用时遇到问题 Caused by: java.lang.NoSuchMethodError: org.jboss.logging.Logger.deb
我有一个简单的@Singleton whitin Java EE项目,该项目解析来自Internet的数据并将其与Hibernate一起保存到PostgreSQL。 @Startup @Singlet
当我尝试将应用程序部署到 WebLogic 服务器时(首先我使用 Maven 构建 war 存档,然后使用 IntelliJ Idea WebLogic 插件进行部署),我收到此错误:我做错了什么?
我正在部署一个使用 Maven 构建的 EAR 应用程序,该应用程序在其中一个模块中具有以下依赖项: org.hibernate hibernate-entitymanager
我正在尝试创建一个简单的 hello world java Web 应用程序,该应用程序通过 hibernate 使用 JPA 并使用 JBoss 6.4.0 作为应用程序服务器。该应用程序已通过 M
我是一名优秀的程序员,十分优秀!