开发者

systemtap script

I want to write a script in systemtap and trace memory system call I want to catch number开发者_开发技巧 of memory system calls and memory used by specific process in a fix duration time I don't know how to write this script.


A good startpoint is this script.


The syscalls that allocate memory are sbrk and mmap, so those are the ones to look for.


I would start with the example for system calls from system tap and then make it specific for the system call you are interested in and print out the args of the system call:

http://sourceware.org/systemtap/examples/process/syscalls_by_proc.stp

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜