随笔 - 170  文章 - 0  评论 - 16  阅读 - 35556 

1、bpf

2、bpftrace

3、strace

    可以查看进程程序的IO调用情况 ,比如进程有哪些IO调用,花费了多长时间等等。可以定位进程慢、驱动慢等问题

     Output format:
            -a column alignment COLUMN for printing syscall results (default 40)
            -i print instruction pointer at time of syscall
            -k obtain stack trace between each syscall (experimental)
            -o file send trace output to FILE instead of stderr
            -q suppress messages about attaching, detaching, etc.
            -r print relative timestamp
            -s strsize limit length of print strings to STRSIZE chars (default 32)
            -t print absolute timestamp
            -tt print absolute timestamp with usecs
            -T print time spent in each syscall
            -x print non-ascii strings in hex
            -xx print all strings in hex
            -y print paths associated with file descriptor arguments
            -yy print protocol specific information associated with socket file descriptors

     Statistics:
            -c count time, calls, and errors for each syscall and report summary
            -C like -c but also print regular output
            -O overhead set overhead for tracing syscalls to OVERHEAD usecs
            -S sortby sort syscall counts by: time, calls, name, nothing (default time)
            -w summarise syscall latency (default is system time)

      Filtering:
            -e expr a qualifying expression: option=[!]all or option=[!]val1[,val2]...
     options: trace, abbrev, verbose, raw, signal, read, write, fault
            -P path trace accesses to path

     Tracing:
            -b execve detach on execve syscall
            -D run tracer process as a detached grandchild, not as parent
            -f follow forks
            -ff follow forks with output into separate files
            -I interruptible
               1: no signals are blocked
               2: fatal signals are blocked while decoding syscall (default)
               3: fatal signals are always blocked (default if '-o FILE PROG')
               4: fatal signals and SIGTSTP (^Z) are always blocked
           (useful to make 'strace -o FILE PROG' not stop on ^Z)

   

5、mtrace

      interpret the malloc trace log

6、ltrace

       A library call tracer

7、fbtracemgr

      Firebird operation traces

8、tracepath

      traces path to a network host discovering MTU along this path

9、strace-log-merge

      merge strace -ff -tt output

posted on   北京开发  阅读(385)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示