性能工具使用

systemTap

采集工具

bcc

分析工具

sysstat 

监控工具

netstat

网络监控工具

分类

  • tools/argdist: Display function parameter values as a histogram or frequency count. Examples.
  • tools/bashreadline: Print entered bash commands system wide. Examples.
  • tools/bpflist: Display processes with active BPF programs and maps. Examples.
  • tools/capable: Trace security capability checks. Examples.
  • tools/compactsnoop: Trace compact zone events with PID and latency. Examples.
  • tools/criticalstat: Trace and report long atomic critical sections in the kernel. Examples
  • tools/deadlock: Detect potential deadlocks on a running process. Examples.
  • tools/drsnoop: Trace direct reclaim events with PID and latency. Examples.
  • tools/funccount: Count kernel function calls. Examples.
  • tools/inject: Targeted error injection with call chain and predicates Examples.
  • tools/klockstat: Traces kernel mutex lock events and display locks statistics. Examples.
  • tools/opensnoop: Trace open() syscalls. Examples.
  • tools/readahead: Show performance of read-ahead cache Examples.
  • tools/reset-trace: Reset the state of tracing. Maintenance tool only. Examples.
  • tools/stackcount: Count kernel function calls and their stack traces. Examples.
  • tools/syncsnoop: Trace sync() syscall. Examples.
  • tools/threadsnoop: List new thread creation. Examples.
  • tools/tplist: Display kernel tracepoints or USDT probes and their formats. Examples.
  • tools/trace: Trace arbitrary functions, with filters. Examples.
  • tools/ttysnoop: Watch live output from a tty or pts device. Examples.
  • tools/ucalls: Summarize method calls or Linux syscalls in high-level languages. Examples.
  • tools/uflow: Print a method flow graph in high-level languages. Examples.
  • tools/ugc: Trace garbage collection events in high-level languages. Examples.
  • tools/uobjnew: Summarize object allocation events by object type and number of bytes allocated. Examples.
  • tools/ustat: Collect events such as GCs, thread creations, object allocations, exceptions and more in high-level languages. Examples.
  • tools/uthreads: Trace thread creation events in Java and raw pthreads. Examples.
Memory and Process Tools

  • tools/execsnoop: Trace new processes via exec() syscalls. Examples.
  • tools/exitsnoop: Trace process termination (exit and fatal signals). Examples.
  • tools/killsnoop: Trace signals issued by the kill() syscall. Examples.
  • tools/kvmexit: Display the exit_reason and its statistics of each vm exit. Examples.
  • tools/memleak: Display outstanding memory allocations to find memory leaks. Examples.
  • tools/oomkill: Trace the out-of-memory (OOM) killer. Examples.
  • tools/pidpersec: Count new processes (via fork). Examples.
  • tools/rdmaucma: Trace RDMA Userspace Connection Manager Access events. Examples.
  • tools/shmsnoop: Trace System V shared memory syscalls. Examples.
  • tools/slabratetop: Kernel SLAB/SLUB memory cache allocation rate top. Examples.
Performance and Time Tools
  • tools/dbslower: Trace MySQL/PostgreSQL queries slower than a threshold. Examples.
  • tools/dbstat: Summarize MySQL/PostgreSQL query latency as a histogram. Examples.
  • tools/funcinterval: Time interval between the same function as a histogram. Examples.
  • tools/funclatency: Time functions and show their latency distribution. Examples.
  • tools/funcslower: Trace slow kernel or user function calls. Examples.
  • tools/hardirqs: Measure hard IRQ (hard interrupt) event time. Examples.
  • tools/mysqld_qslower: Trace MySQL server queries slower than a threshold. Examples.
  • tools/ppchcalls: Summarize ppc hcall counts and latencies. Examples.
  • tools/softirqs: Measure soft IRQ (soft interrupt) event time. Examples.
  • tools/syscount: Summarize syscall counts and latencies. Examples.
CPU and Scheduler Tools
  • tools/cpudist: Summarize on- and off-CPU time per task as a histogram. Examples
  • tools/cpuunclaimed: Sample CPU run queues and calculate unclaimed idle CPU. Examples
  • tools/llcstat: Summarize CPU cache references and misses by process. Examples.
  • tools/offcputime: Summarize off-CPU time by kernel stack trace. Examples.
  • tools/offwaketime: Summarize blocked time by kernel off-CPU stack and waker stack. Examples.
  • tools/profile: Profile CPU usage by sampling stack traces at a timed interval. Examples.
  • tools/runqlat: Run queue (scheduler) latency as a histogram. Examples.
  • tools/runqlen: Run queue length as a histogram. Examples.
  • tools/runqslower: Trace long process scheduling delays. Examples.
  • tools/wakeuptime: Summarize sleep to wakeup time by waker kernel stack. Examples.
  • tools/wqlat: Summarize work waiting latency on workqueue. Examples.
Network and Sockets Tools
  • tools/gethostlatency: Show latency for getaddrinfo/gethostbyname[2] calls. Examples.
  • tools/bindsnoop: Trace IPv4 and IPv6 bind() system calls (bind()). Examples.
  • tools/netqtop tools/netqtop.c: Trace and display packets distribution on NIC queues. Examples.
  • tools/sofdsnoop: Trace FDs passed through unix sockets. Examples.
  • tools/solisten: Trace TCP socket listen. Examples.
  • tools/sslsniff: Sniff OpenSSL written and readed data. Examples.
  • tools/tcpaccept: Trace TCP passive connections (accept()). Examples.
  • tools/tcpconnect: Trace TCP active connections (connect()). Examples.
  • tools/tcpconnlat: Trace TCP active connection latency (connect()). Examples.
  • tools/tcpdrop: Trace kernel-based TCP packet drops with details. Examples.
  • tools/tcplife: Trace TCP sessions and summarize lifespan. Examples.
  • tools/tcpretrans: Trace TCP retransmits and TLPs. Examples.
  • tools/tcprtt: Trace TCP round trip time. Examples.
  • tools/tcpstates: Trace TCP session state changes with durations. Examples.
  • tools/tcpsubnet: Summarize and aggregate TCP send by subnet. Examples.
  • tools/tcpsynbl: Show TCP SYN backlog. Examples.
  • tools/tcptop: Summarize TCP send/recv throughput by host. Top for TCP. Examples.
  • tools/tcptracer: Trace TCP established connections (connect(), accept(), close()). Examples.
  • tools/tcpcong: Trace TCP socket congestion control status duration. Examples.
Storage and Filesystems Tools
  • tools/bitesize: Show per process I/O size histogram. Examples.
  • tools/cachestat: Trace page cache hit/miss ratio. Examples.
  • tools/cachetop: Trace page cache hit/miss ratio by processes. Examples.
  • tools/dcsnoop: Trace directory entry cache (dcache) lookups. Examples.
  • tools/dcstat: Directory entry cache (dcache) stats. Examples.
  • tools/biolatency: Summarize block device I/O latency as a histogram. Examples.
  • tools/biotop: Top for disks: Summarize block device I/O by process. Examples.
  • tools/biopattern: Identify random/sequential disk access patterns. Examples.
  • tools/biosnoop: Trace block device I/O with PID and latency. Examples.
  • tools/dirtop: File reads and writes by directory. Top for directories. Examples.
  • tools/filelife: Trace the lifespan of short-lived files. Examples.
  • tools/filegone: Trace why file gone (deleted or renamed). Examples.
  • tools/fileslower: Trace slow synchronous file reads and writes. Examples.
  • tools/filetop: File reads and writes by filename and process. Top for files. Examples.
  • tools/mdflush: Trace md flush events. Examples.
  • tools/mountsnoop: Trace mount and umount syscalls system-wide. Examples.
  • tools/virtiostat: Show VIRTIO device IO statistics. Examples.
Filesystems Tools
  • tools/btrfsdist: Summarize btrfs operation latency distribution as a histogram. Examples.
  • tools/btrfsslower: Trace slow btrfs operations. Examples.
  • tools/ext4dist: Summarize ext4 operation latency distribution as a histogram. Examples.
  • tools/ext4slower: Trace slow ext4 operations. Examples.
  • tools/nfsslower: Trace slow NFS operations. Examples.
  • tools/nfsdist: Summarize NFS operation latency distribution as a histogram. Examples.
  • tools/vfscount: Count VFS calls. Examples.
  • tools/vfsstat: Count some VFS calls, with column output. Examples.
  • tools/xfsdist: Summarize XFS operation latency distribution as a histogram. Examples.
  • tools/xfsslower: Trace slow XFS operations. Examples.
  • tools/zfsdist: Summarize ZFS operation latency distribution as a histogram. Examples.
  • tools/zfsslower: Trace slow ZFS operations. Examples.

Networking

Examples:

  • examples/networking/distributed_bridge/: Distributed bridge example.
  • examples/networking/http_filter/: Simple HTTP filter example.
  • examples/networking/simple_tc.py: Simple traffic control example.
  • examples/networking/simulation.py: Simulation helper.
  • examples/networking/neighbor_sharing/tc_neighbor_sharing.py examples/networking/neighbor_sharing/tc_neighbor_sharing.c: Per-IP classification and rate limiting.
  • examples/networking/tunnel_monitor/: Efficiently monitor traffic flows.
  • examples/networking/vlan_learning/vlan_learning.py examples/vlan_learning.c: Demux Ethernet traffic into worker veth+namespaces.

BPF Introspection

Tools that help to introspect BPF programs.

  • introspection/bps.c: List all BPF programs loaded into the kernel. 'ps' for BPF programs. Examples.

CPU 常用相关

uptime

观看负载情况,一般后端开发人员不怎么用。1,5,15 分钟负载状态。

top

监控系统中最大消耗的进程。一般开发人员观看内存和cpu使用情况的。关注虚拟内存和cpu比。

vmstat

监控cpu整体使用情况

[root@lt coder]# vmstat -w 1
procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------
 r[线程数]  b         swpd         free         buff        cache   si   so    bi    bo   in   cs[切换上下文]  us[用户态占比]  sy[系统态占比]  id  wa[等待io]  st
 1  0            0      7180468         2108       549120    0    0    46    39   70   80   1   0  99   0   0
 0  0            0      7180444         2108       549120    0    0     0     0   83  118   0   0 100   0   0
 0  0            0      7180212         2108       549120    0    0     0    10  273  484   1   1  98   0   0

mpstat

具体显示每个cpu情况

mpstat -P ALL 1
Linux 3.10.0-1160.92.1.el7.x86_64 (lt)     05/06/2024     _x86_64_    (2 CPU)

06:01:16 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
06:01:17 PM  all    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00
06:01:17 PM    0    0.00    0.00    1.00    0.00    0.00    0.00    0.00    0.00    0.00   99.00
06:01:17 PM    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00

pidstat

pidstat 1

execsnoop

perf

内存相关

内存泄漏 valgrand

文件系统相关

磁盘IO相关

网络IO相关

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/670046.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Socket学习记录

本次学习Socket的编程开发,该技术在一些通讯软件,比如说微信,QQ等有广泛应用。 网络结构 这些都是计算机网络中的内容,我们在这里简单回顾一下: UDP(User Datagram Protocol):用户数据报协议;TCP(Transmission Contr…

FastDFS - 无法获取服务端连接资源:can‘t create connection to/xx.xx.xx.xx:0

问题描述 根据官方文档 安装完FastDFS服务器后, 服务正常启动,但是在 SpringBoot 项目使用 fastdfs-client 客户端报错无法获取服务端连接资源:cant create connection to/xx.xx.xx.xx:0, 一系列排查发现是获取到的 tracker 端口为 0 。 co…

开源模型应用落地-CodeQwen模型小试-SQL专家测试(二)

一、前言 代码专家模型是基于人工智能的先进技术,它能够自动分析和理解大量的代码库,并从中学习常见的编码模式和最佳实践。这种模型可以提供准确而高效的代码建议,帮助开发人员在编写代码时避免常见的错误和陷阱。 通过学习代码专家模型&…

Linux:进程信号(一)信号的产生

目录 一、信号是什么? 二、Linux信号 三、信号处理方式 四、信号的产生 1、 通过终端按键产生信号 2、调用系统函数向进程发信号 3、 硬件异常产生信号 一、信号是什么? 在生活中,有许多信号,比如红绿灯,下课铃声…

一键 input 苹果 OpenELM,零门槛 Llama 3 教程,40+ 优质模型/数据集/教程,建议收藏!...

现在 AI 行业什么最火? 「大模型」一定仍然排在前三甲的位置。 自从 2022 年底 ChatGPT 面世以来,大模型在各行各业已经带来了太多的惊喜,应用场景愈发丰富,同时也带动了相关底层技术的普及与普适化。尤其是在开源模型繁荣发展之下…

CkickHouse JDBC 使用整理

1. pom 引入 <dependency><groupId>com.clickhouse</groupId><artifactId>clickhouse-jdbc</artifactId><version>0.4.6</version></dependency><dependency><groupId>org.roaringbitmap</groupId><arti…

星戈瑞CY7-COOH荧光探针,助力生物医学研究

CY7-COOH是一种近红外荧光染料&#xff0c;具有优异的光稳定性、高量子产率和强烈的荧光信号。此外&#xff0c;CY7-COOH还具有较长的激发和发射波长&#xff0c;使其在生物医学成像中具有较高的穿透力和较低的背景干扰。这使得CY7-COOH荧光探针在生物医学研究中具有诸多应用前…

YOLOv5网络结构解析

YOLOv5的实现细节解析&#xff1a;基础组件与实现细节 YOLO&#xff08;You Only Look Once&#xff09;系列作为目标检测领域的重要算法&#xff0c;以其速度快、性能好而著称。YOLOv5是该系列的最新版本&#xff0c;它在保持YOLO一贯的简洁高效特点的同时&#xff0c;进一步…

武汉星起航:跨境电商领域国际竞争力卓越,引领行业再上新台阶

在全球化浪潮的推动下&#xff0c;跨境电商行业日益成为各国经济交流与合作的重要桥梁。武汉星起航电子商务有限公司&#xff0c;作为跨境电商领域的佼佼者&#xff0c;凭借其深厚的行业经验和前瞻性的战略视野&#xff0c;在国际市场上展现出强大的竞争力&#xff0c;为行业的…

pyqt 分组框控件QGroupBox

pyqt 分组框控件QGroupBox 分组框控件QGroupBox介绍效果代码 分组框控件QGroupBox介绍 QGroupBox提供了一个框架&#xff0c;用于将其他控件&#xff08;如按钮、滑块、标签等&#xff09;组合在一起。 QGroupBox 通常包含一个标题栏和一个内容区域。标题栏显示文本标签&#…

Pyserini

文章目录 关于 Pyserini安装&#x1f3ac;如何搜索&#xff1f;&#x1f64b;如何给我的语料集建立索引 关于 Pyserini github : https://github.com/castorini/pyseriniPyserini: An Easy-to-Use Python Toolkit to Support Replicable IR Research with Sparse and Dense Re…

热敏电阻符号与常见术语详细解析

热敏电阻是一种电阻器&#xff0c;其特点是电阻值随温度的变化而显著变化&#xff0c;这使得它们成为非常有用的温度传感器。它们可以由单晶、多晶或玻璃、塑料等半导体材料制成&#xff0c;并分为两大类&#xff1a;正温度系数热敏电阻&#xff08;#PTC热敏电阻#&#xff09;和…