systemTap笔记
作者:互联网
安装systemTap:
需要安装内核的debug信息版本:
kernel-debuginfo-3.10.0-957.el7.x86_64.rpm
kernel-debuginfo-common-x86_64-3.10.0-957.el7.x86_64.rpm
yum install systemtap systemtap-runtime
执行测试命令:
stap -ve 'global stats; probe syscall.read.return { stats <<< $return; } probe end {printf("\n\trval(bytes)\n"); print(@hist_log(stats));}'
输出结果:
Pass 1: parsed user script and 475 library scripts using 278720virt/75912res/3512shr/72636data kb, in 700usr/70sys/768real ms.
Pass 2: analyzed script: 2 probes, 2 functions, 3 embeds, 1 global using 321404virt/119572res/4464shr/115320data kb, in 740usr/180sys/926real ms.
Pass 3: translated to C into "/tmp/stapN7AJou/stap_2354f13f135c8a08468658cf5dd4e607_6762_src.c" using 321404virt/119920res/4812shr/115320data kb, in 10usr/60sys/71real ms.
Pass 4: compiled C into "stap_2354f13f135c8a08468658cf5dd4e607_6762.ko" in 8860usr/2290sys/11273real ms.
Pass 5: starting run.
等待一会儿之后ctrl+c结束命令,然后可能看到输出。
标签:systemTap,x86,stap,笔记,64,ms,Pass,using 来源: https://www.cnblogs.com/lifewithlight/p/16546973.html