Giter VIP home page Giter VIP logo

signaltracer's Introduction

SignalTracer

一个追踪信号的内核模块,支持内核5.10+

A kernel module for tracing signal, support kernel 5.10+

Usage / 使用方法

# ls /sys/module/SignalTracer/parameters/
dump_kernel_stack  match_from_uid  match_sig  match_target_uid

Start stacktrace / 开启调用栈打印

echo Y > /sys/module/SignalTracer/parameters/dump_kernel_stack

Stop stacktrace / 关闭调用栈打印

echo N > /sys/module/SignalTracer/parameters/dump_kernel_stack

Stacktrace config / 调用栈打印配置

-1 means no restrictions

# only print stacktrace when SIGKILL / 只打印 SIGKILL
echo 9 > /sys/module/SignalTracer/parameters/match_sig
# only print stacktrace when root kill someone / 只在 root 进程杀死其他进程的时候打印
echo 0 > /sys/module/SignalTracer/parameters/match_from_uid
# only print stacktrace when shell is killed / 只在 shell 进程被杀死的时候打印
echo 2000 > /sys/module/SignalTracer/parameters/match_target_uid

# With 3 restrictions above, only print when root kill -9 shell
# 有了上面的三个限制,只在 root 进程杀死 shell 进程的时候打印调用栈

signaltracer's People

Contributors

ylarod avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.