Install and use systemtap in ubuntu 8.04

Source: Internet
Author: User
Tags systemtap
Systemtap is a linux System Call and tracking program. If you have used filemon or processmonitor in windows, you will understand it. systemtap is more powerful than processmonitor and more customizable. but obviously, like most linux programs, it is more difficult to use!
Many posts have been posted to install this systemtap. The simplest method is as follows:
  1. Run the command: sudo apt-get install linux-image-debug-'uname-R'
  2. Run the command: sudo ln-s vmlinux-debug-'uname-R' vmlinux-'uname-R'
  3. Run the command: sudo apt-get install systemtap

In this way, you can construct a simple script file a. stp, as shown below:

Probe syscall. open
{
Printf ("% s (% d) open (% s) \ n", execname (), pid (), argstr)
}

Run the following command: sudo stap. /. if STPS goes well, you can see the output. however, when I run pass5, the following error occurs:/usr/lib/systemtap/stapio terminated. The cause is being found.

If you are not used to using such a highly customized tool, you can use strace instead. The usage is simple: strace-f-o out_trace.txt/opt/eclipse I am here to track the file read/write records during eclipse runtime.

References:

  • Http://blog.chinaunix.net/u/12679/showart_529575.html (Note: This method is not good, I have a problem in the xubuntu interface, and stap cannot run)
  • Https://bugs.launchpad.net/ubuntu/+source/systemtap/+bug/106957
  • Http://sourceware.org/systemtap/tutorial/node5.html for compiling systemtap scripts
  • Http://www.ibm.com/developerworks/cn/linux/l-systemtap/ uses Systemtap to debug the kernel
  • The http://www.xxlinux.com/linux/article/development/soft/20051125/67.html uses truss, strace, ltrace trace

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.