Kyanos is an advanced eBPF-based tool designed to simplify network issue analysis. It captures requests for HTTP, Redis, and MySQL, enabling users to quickly troubleshoot issues without the hassle of traditional packet capturing methods. With powerful filtering options and capabilities for aggregating packet metrics, Kyanos helps you identify network abnormalities efficiently.
Kyanos is a cutting-edge eBPF-based network issue analysis tool designed to empower developers and network administrators with the capability to visualize and analyze network requests efficiently right from the command line. This powerful tool captures various network requests, including HTTP, Redis, and MySQL, and simplifies the process of identifying and troubleshooting network-related issues without the cumbersome steps typically involved in packet capturing and analysis.
Key Features:
-
Powerful Traffic Filtering: Go beyond traditional IP/port filtering with Kyanos. Filter network traffic by process or container, layer 7 (L7) protocol information, request/response byte size, latency, and more.
# Filter by PID ./kyanos watch --pids 1234 # Filter by container ID ./kyanos watch --container-id abc # Filter by Redis key ./kyanos watch redis --keys my-key1,my-key2 # Filter by response byte size ./kyanos watch --resp-size 10000
-
Advanced Analysis Capabilities:
Unlike traditional tools like tcpdump, Kyanos aggregates captured packet metrics across various dimensions, enabling you to quickly pinpoint critical issues. If your HTTP service experiences a bandwidth spike, simply run:kyanos stat http --bigresp
to identify the largest response byte sizes sent to remote IPs along with precise request and response metrics.
-
In-Depth Kernel-Level Latency Insights:
Kyanos excels at diagnosing slow queries to remote services such as Redis. It provides detailed kernel trace points from when requests and responses arrive at the network card to the kernel socket buffer, offering visual insights into latency sources. -
Lightweight and Dependency-Free:
Kyanos boasts nearly zero dependencies—a single binary file is all you need to get started, with results displayed directly in the command line. -
Automatic SSL Traffic Decryption:
All captured requests and responses are conveniently presented in plaintext for easy analysis.
Usage Examples:
To get started with Kyanos, you can capture HTTP traffic and view latency details with:
./kyanos watch http
For Redis traffic, use:
./kyanos watch redis
You can also identify the slowest requests over the last 5 seconds with the command:
./kyanos stat --slow --time 5
Technical Requirements:
Kyanos supports kernel versions ranging from 3.10 onwards (including 4.14 and above). To check your kernel version, simply run:
uname -r
For further information and detailed usage documentation, visit the Kyanos Documentation.
For feedback or contributions, feel free to reach out through the issue tracker or contact me directly at hengyoush1@163.com. Join the community, and let's simplify network issue analysis with Kyanos!