All Projects → sthima → libstapsdt

sthima / libstapsdt

Licence: MIT license
Create Systemtap's USDT probes at runtime

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
Makefile
30231 projects
assembly
5116 projects

Projects that are alternatives of or similar to libstapsdt

systemtap-toolkit
YouZan systemtap toolkit to online analyze on production
Stars: ✭ 63 (-38.83%)
Mutual labels:  systemtap
Bpftrace
High-level tracing language for Linux eBPF
Stars: ✭ 4,526 (+4294.17%)
Mutual labels:  usdt
crypto-quotes
100+ Best of Crypto Quotes - I HODL, you HODL, we HODL! - BREAKING: BITCOIN JUST BROKE $22 000!
Stars: ✭ 12 (-88.35%)
Mutual labels:  usdt
awesome-tetherino
Awesome Tetherino - 60 000+ Million $USDT Crypto "Stable" Coin Printed Out of Thin Air and Officially Backed by Commercial Paper (2-Ply Rated Soft - Yes, Trust Us, Don't Verify) - Inside the Tether Ponzi Scheme - A Bubble for the History Books and Fraud on the Scale of Madoff
Stars: ✭ 45 (-56.31%)
Mutual labels:  usdt
Stablecoins-Infinity-Profit-Bot
Infinite profit with stablecoins.
Stars: ✭ 92 (-10.68%)
Mutual labels:  usdt
go-dc-wallet
交易所收提币功能
Stars: ✭ 76 (-26.21%)
Mutual labels:  usdt
MugglePay
Make Crypto Payment Easy 让数字货币支付更简单
Stars: ✭ 176 (+70.87%)
Mutual labels:  usdt

libstapsdt

Stability Build Status Read the Docs


libstapsdt is a library which allows creating and firing Systemtap's USDT probes at runtime. It's inspired on chrisa/libusdt. The goal of this library is to add USDT probes functionality to dynamic languages.

Table of Contents

How it works

Systemtap's USDT implementation allows only statically defined probes because they are set as ELF notes by the compiler. To create probes at runtime, libstapsdt takes advantage of shared libraries: it creates a small library with an ELF note and links it at runtime. This way, most existing tools will keep working as expected.

Dependencies

libstapsdt currently requires the following dependencies:

  • libelf (from elfutils)

Ubuntu 16.04

sudo apt install libelf1 libelf-dev

Fedora 29

sudo dnf install elfutils-libelf-devel

Install

To build and install libstapsdt, just run:

make
sudo make install
sudo ldconfig

Demo

There's a demo program available. To build it, run:

make demo  # Executable will be available at ./demo

Usage:

./demo PROVIDER_NAME PROBE_NAME

After running the demo program, it can be instrumented with proper tools.

Here's an example using eBPF/bcc trace tool (built from source):

sudo /usr/share/bcc/tools/trace -p $(pgrep demo) 'u::PROBE_NAME'

Run tests

To run tests, just run the command below. Please be aware that there are only a few tests for now, but more will be added in the future.

make test

Wrappers

Here is a list of wrappers for other languages:

Write your own wrapper

libstapsdt is written in C, which makes it very portable to almost any language. Most dynamic languages provide a way to wrap C code. Feel free to develop a wrapper in your language of choice. If you do, please let us know to update our wrappers list!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].