Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and use of systemtap

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "the installation and use of systemtap". In the daily operation, I believe that many people have doubts about the installation and use of systemtap. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "installation and use of systemtap". Next, please follow the editor to study!

Install the systemtap environment

# yum install systemtap systemtap-runtime

Install kernel debugging information

Connect to the public network and use the stap-prep command to install

# stap-prep

If you cannot connect to the public network, or if there is no yum source, you need to manually download kernel debugging information and install it.

First check the kernel version number uname-r

[root@ceph2 ~] # uname-r

3.10.0-123.el7.x86_64

Then the kernel packages to be installed are as follows:

Kernel-debuginfo-3.10.0-123.el7.x86_64

Kernel-debuginfo-common-x86_64-3.10.0-123.el7.x86_64

Kernel-devel.x86_64-3.10.0-123.el7.x86_64

Install ceph debug package

Ceph-debuginfo.x86_64

And install, the version number of the ceph debugger package must be the same as the version number of the deployed ceph.

Use systemtap

# vi osd.stp

Probe process ("ceph-osd"). Function ("OSD::*"). Call, process ("ceph-osd"). Function ("OSDService::*"). Call {printf ("% s->% s\ n", thread_indent (4), ppfunc ());}

Process represents the name of the program, and function represents the name of the function, if OSD::*, represents the output of all related functions of the OSD class.

Printf means printed out, printf,thread_indent similar to C language is used to represent printed thread number, and ppfunc () indicates printed function name.

Running

# stap-x {osdpid} osd.stp

At this point, the study on "installation and use of systemtap" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report