5.56 BCC工具之funcslower.py解读

一,工具简介

funcslower主要可以显示内核或用户函数调用慢于既定阈值的情况。当基于聚合的工具失败时,它可以用于最后的诊断。

二,代码示例

#!/usr/bin/env python

from __future__ import print_function
from bcc import BPF
import argparse
import time

examples = """examples:
  ./funcslower vfs_write        # trace vfs_write calls slower than 1ms
  ./funcslower -m 10 vfs_write  # same, but slower than 10ms
  ./funcslower -u 10 c:open     # trace open calls slower than 10us
  ./funcslower -p 135 c:open    # trace pid 135 only
  ./funcslower c:malloc c:free  # trace both malloc and free slower than 1ms
  ./funcslower -a 2 c:open      # show first two arguments to open
  ./funcslower -UK -m 10 c:open # Show user and kernel stack frame of open calls slower than 10ms
  ./funcslower -f -UK c:open    # Output in folded format for flame graphs
"""
parser = argparse.ArgumentParser(
    description="Trace slow kernel or user function calls.",
    formatter_class

相关推荐

  1. 5.56 BCC工具funcslower.py解读

    2024-03-10 10:16:03       46 阅读
  2. 5.8 BCC工具mysqld_query.py解读

    2024-03-10 10:16:03       52 阅读
  3. 5.54 BCC工具dbstat.py解读

    2024-03-10 10:16:03       46 阅读
  4. 5.53 BCC工具dbslower.py解读

    2024-03-10 10:16:03       41 阅读
  5. 5.49 BCC工具rdmaucma.py解读

    2024-03-10 10:16:03       42 阅读
  6. 5.52 BCC工具dbslower.py解读

    2024-03-10 10:16:03       47 阅读
  7. 5.69 BCC工具runqlen.py解读

    2024-03-10 10:16:03       46 阅读
  8. 5.82 BCC工具tcpdrop.py解读

    2024-03-10 10:16:03       39 阅读
  9. 5.70 BCC工具runqslower.py解读

    2024-03-10 10:16:03       35 阅读
  10. 5.72 BCC工具wakeuptime.py解读

    2024-03-10 10:16:03       43 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-10 10:16:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-10 10:16:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-10 10:16:03       82 阅读
  4. Python语言-面向对象

    2024-03-10 10:16:03       91 阅读

热门阅读

  1. ODI报错

    ODI报错

    2024-03-10 10:16:03      31 阅读
  2. centos7.9升级ssh和openssl

    2024-03-10 10:16:03       46 阅读
  3. Android工具adb下载安装环境配置详细教程

    2024-03-10 10:16:03       45 阅读
  4. 数据库中关于结构化查询语言sql的简单介绍

    2024-03-10 10:16:03       42 阅读