linux systemtap报错解决

柔情只为你懂 2022-04-15 01:37 665阅读 0赞

使用stap命令时报如下错误

  1. stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JmaGFp_size_16_color_FFFFFF_t_70

  1. [root@myds1 tmp]# stap /usr/share/doc/systemtap-client-2.6/examples/io/inodewatch.stp 253 1 204550458
  2. semantic error: while resolving probe point: identifier 'kernel' at /usr/share/systemtap/tapset/linux/vfs.stp:836:19
  3. source: probe vfs.write = kernel.function("vfs_write")
  4. ^
  5. semantic error: missing x86_64 kernel/module debuginfo [man warning::debuginfo] under '/lib/modules/3.10.0-229.el7.x86_64/build'
  6. semantic error: while resolving probe point: identifier 'vfs' at /usr/share/doc/systemtap-client-2.6/examples/io/inodewatch.stp:3:7
  7. source: probe vfs.write, vfs.read
  8. ^
  9. semantic error: no match
  10. Pass 2: analysis failed. [man error::pass2]
  11. Number of similar error messages suppressed: 2.
  12. Rerun with -v to see them.

报错原因:

缺少kernel-debuginfo-common、kernel-debuginfo两个依赖包

解决方式:

(1)查看linux内核版本

  1. uname -r

20181120085628250.png

(2)下载与内核版本一致的rpm包

20181120085706238.png

(3)安装rpm包

  1. rpm -ivh kernel-debuginfo-common-x86_64-3.10.0-229.el7.x86_64.rpm
  2. rpm -ivh kernel-debuginfo-3.10.0-229.el7.x86_64.rpm

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JmaGFp_size_16_color_FFFFFF_t_70 1

(4)重新运行测试命令

watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JmaGFp_size_16_color_FFFFFF_t_70 2

成功运行

å¨è¿éæå¥å¾çæè¿°

发表评论

表情:
评论列表 (有 0 条评论,665人围观)

还没有评论,来说两句吧...

相关阅读

    相关 linux 常见

    yum install 包名        出现安装包重复,同一个安装包出现多版本 使用 rpm -qa |grep 包名  如果出现包名,则说明已存在该包(已被安装),要