Tuesday, August 25, 2009

[Level 3] Systemtap on Linux.

Today, my boss want me to find some data to compare with Solaris and Linux.
And I find a freeware(GPL) on Linux, called systemtap.
It looks like the "DTrace" in Solaris.
As the documents writes, the we have to download the kernel package then we can start to use it. The commands as the following:
# yum install systemtap kernel-devel yum-utils
# debuginfo-install kernel
 
The sample "script" as the following:
# stap -ve 'probe begin { log("hello world") exit () }'
# stap -c df -e 'probe syscall.* \
{ if (target()==pid()) log(name." ".argstr) }' 
 
Any Linux user use this before?

Wish this helps.

regards,
Stanley Huang