{"id":15056975,"url":"https://github.com/hengyoush/kyanos","last_synced_at":"2025-05-13T22:05:40.944Z","repository":{"id":237185863,"uuid":"793985221","full_name":"hengyoush/kyanos","owner":"hengyoush","description":"Kyanos is a networking analysis tool using eBPF. It can visualize the time packets spend in the kernel, capture requests/responses, makes troubleshooting more efficient.","archived":false,"fork":false,"pushed_at":"2025-04-21T16:29:09.000Z","size":39885,"stargazers_count":4089,"open_issues_count":47,"forks_count":155,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-21T17:26:42.321Z","etag":null,"topics":["bpf","capture","command-line","command-line-tool","ebpf","network","sniffer","tcp","tcpdump","tcpdump-like"],"latest_commit_sha":null,"homepage":"https://kyanos.io","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hengyoush.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-30T08:36:56.000Z","updated_at":"2025-04-21T16:29:12.000Z","dependencies_parsed_at":"2024-10-28T03:54:39.480Z","dependency_job_id":"1371b9ce-0e99-452b-bada-d5649fd3c772","html_url":"https://github.com/hengyoush/kyanos","commit_stats":{"total_commits":381,"total_committers":3,"mean_commits":127.0,"dds":0.06036745406824151,"last_synced_commit":"24b3b35b01cc9eecf457cfdfee97c7879023372c"},"previous_names":["hengyoush/eapm-ebpf-agent","hengyoush/kyanos"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hengyoush%2Fkyanos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hengyoush%2Fkyanos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hengyoush%2Fkyanos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hengyoush%2Fkyanos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hengyoush","download_url":"https://codeload.github.com/hengyoush/kyanos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251340401,"owners_count":21573898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bpf","capture","command-line","command-line-tool","ebpf","network","sniffer","tcp","tcpdump","tcpdump-like"],"created_at":"2024-09-24T21:59:41.682Z","updated_at":"2025-04-28T15:40:15.376Z","avatar_url":"https://github.com/hengyoush.png","language":"C","funding_links":[],"categories":["Projects Related to eBPF","By Industry","C","Repos","others","BPF and eBPF Projects","By Language","\u003ca name=\"networking\"\u003e\u003c/a\u003eNetworking","Table of Contents"],"sub_categories":["Observability","Tools \u0026 Utilities","Notes","C"],"readme":"# kyanos\n\n\u003cdiv align=\"center\"\u003e \n\u003ci\u003eOne command to find slowest requests and identify the reasons.\u003c/i\u003e\n \u003cbr/\u003e\n\u003c/div\u003e\n\n![](docs/public/kyanos-demo.gif)\n\n\u003cdiv align=\"center\"\u003e  \n \n[![GitHub last commit](https://img.shields.io/github/last-commit/hengyoush/kyanos)](#) \n[![GitHub release](https://img.shields.io/github/v/release/hengyoush/kyanos)](#) \n[![Test](https://github.com/hengyoush/kyanos/actions/workflows/test.yml/badge.svg)](https://github.com/hengyoush/kyanos/actions/workflows/test.yml) \n\n\u003ca href=\"https://trendshift.io/repositories/12330\" target=\"_blank\"\u003e\u003cimg src=\"https://trendshift.io/api/badge/repositories/12330\" alt=\"hengyoush%2Fkyanos | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/\u003e\u003c/a\u003e\n[![Featured on Hacker News](https://hackerbadge.now.sh/api?id=42154583)](https://news.ycombinator.com/item?id=42154583)\n\u003ca href=\"https://hellogithub.com/repository/9e20a14a45dd4cd5aa169acf0e21fc45\" target=\"_blank\"\u003e\u003cimg src=\"https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=9e20a14a45dd4cd5aa169acf0e21fc45\u0026claim_uid=temso5CUu6fB7wb\" alt=\"Featured｜HelloGitHub\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n[简体中文](./README_CN.md) | English\n\n- [English Document](https://kyanos.io/)\n\n## Table of Contents\n\n- [kyanos](#kyanos)\n  - [Table of Contents](#table-of-contents)\n  - [What is kyanos](#what-is-kyanos)\n  - [Examples](#examples)\n  - [❗ Requirements](#-requirements)\n  - [🎯 How to get kyanos](#-how-to-get-kyanos)\n  - [📝 Documentation](#-documentation)\n  - [⚙ Usage](#-usage)\n  - [🏠 How to build](#-how-to-build)\n  - [Roadmap](#roadmap)\n  - [🤝 Feedback and Contributions](#-feedback-and-contributions)\n  - [🙇‍ Special Thanks](#-special-thanks)\n  - [🗨️ Contacts](#️-contacts)\n  - [Star History](#star-history)\n\n## What is kyanos\n\nKyanos is an **eBPF-based** network issue analysis tool that enables you to\ncapture network requests, such as HTTP, Redis, and MySQL requests.  \nIt also helps you analyze abnormal network issues and quickly troubleshooting\nwithout the complex steps of packet capturing, downloading, and analysis.\n\n1. **Powerful Traffic Filtering**: Not only can filter based on traditional\n   IP/port information, can also filter by process/container, L7 protocol\n   information, request/response byte size, latency, and more.\n\n```bash\n# Filter by pid\n./kyanos watch --pids 1234\n# Filter by container id\n./kyanos watch --container-id abc\n# Filter by Redis key\n./kyanos watch redis --keys my-key1,my-key2\n# Filter by response byte size\n./kyanos watch --resp-size 10000\n```\n\n2. **Advanced Analysis Capabilities** : Unlike tcpdump, which only provides\n   fine-grained packet capture, Kyanos supports aggregating captured packet\n   metrics across various dimensions, quickly providing the critical data most\n   useful for troubleshooting.  \n   Imagine if the bandwidth of your HTTP service is suddenly maxed out—how would\n   you quickly analyze `which IPs` and `which  requests` are causing it?  \n   With Kyanos, you just need one command: `kyanos stat http --bigresp` to find\n   the largest response byte sizes sent to remote IPs and view specific data on\n   request and response metrics.  \n   ![kyanos find big response](docs/public/whatkyanos.gif)\n\n3. **In-Depth Kernel-Level Latency Details**: In real-world, slow queries to\n   remote services like Redis can be challenging to diagnose precisely. Kyanos\n   provides kernel trace points from the arrival of requests/responses at the\n   network card to the kernel socket buffer, displaying these details in a\n   visual format. This allows you to identify exactly which stage is causing\n   delays.\n\n![kyanos time detail](docs/public/timedetail.jpg)\n\n4. **Lightweight and Dependency-Free**: Almost zero dependencies—just a single\n   binary file and one command, with all results displayed in the command line.\n\n5. **Automatic SSL Traffic Decryption** : All captured requests and responses\n   are presented in plaintext.\n\n## Examples\n\n**Capture HTTP Traffic with Latency Details**\n\nRun the command:\n\n```bash\n./kyanos watch http\n```\n\nThe result is as follows:\n\n![kyanos quick start watch http](docs/public/qs-watch-http.gif)\n\n**Capture Redis Traffic with Latency Details**\n\nRun the command:\n\n```bash\n./kyanos watch redis\n```\n\nThe result is as follows:\n\n![kyanos quick start watch redis](docs/public/qs-redis.gif)\n\n**Identify the Slowest Requests in the Last 5 Seconds**\n\nRun the command:\n\n```bash\n ./kyanos stat --slow --time 5\n```\n\nThe result is as follows:\n\n![kyanos stat slow](docs/public/qs-stat-slow.gif)\n\n## ❗ Requirements\n\nKyanos currently supports kernel versions 3.10(from 3.10.0-957) and 4.14 or\nabove (with plans to support versions between 4.7 and 4.14 in the future).\n\n\u003e You can check your kernel version using `uname -r`.\n\n## 🎯 How to get kyanos\n\nYou can download a statically linked binary compatible with amd64 and arm64\narchitectures from the\n[release page](https://github.com/hengyoush/kyanos/releases):\n\n```bash\ntar xvf kyanos_vx.x.x_linux_amd64.tar.gz\n```\n\nThen, run kyanos with **root privilege**:\n\n```bash\nsudo ./kyanos watch\n```\n\nIf the following table appears:\n![kyanos quick start success](docs/public/quickstart-success.png) 🎉\nCongratulations! Kyanos has started successfully.\n\n## 📝 Documentation\n\n[English Document](https://kyanos.io/)\n\n## ⚙ Usage\n\nThe simplest usage captures all protocols currently supported by Kyanos:\n\n```bash\nsudo ./kyanos watch\n```\n\nEach request-response record is stored as a row in a table, with each column\ncapturing basic information about that request. You can use the arrow keys or\n`j/k` to move up and down through the records:\n![kyanos watch result](docs/public/watch-result.jpg)\n\nPress `Enter` to access the details view:\n\n![kyanos watch result detail](docs/public/watch-result-detail.jpg)\n\nIn the details view, the first section shows **Latency Details**. Each block\nrepresents a \"node\" that the data packet passes through, such as the process,\nnetwork card, and socket buffer.  \nEach block includes a time value indicating the time elapsed from the previous\nnode to this node, showing the process flow from the process sending the request\nto the network card, to the response being copied to the socket buffer, and\nfinally read by the process, with each step’s duration displayed.\n\nThe second section provides **Detailed Request and Response Content**, split\ninto Request and Response parts, and truncates content over 1024 bytes.\n\nFor targeted traffic capture, such as HTTP traffic:\n\n```bash\n./kyanos watch http\n```\n\nYou can narrow it further to capture traffic for a specific HTTP path:\n\n```bash\n./kyanos watch http --path /abc\n```\n\nLearn more: [Kyanos Docs](https://kyanos.io/)\n\n## 🏠 How to build\n\n👉 [COMPILATION.md](./COMPILATION.md)\n\n## Roadmap\n\nThe Kyanos Roadmap shows the future plans for Kyanos. If you have feature\nrequests or want to prioritize a specific feature, please submit an issue on\nGitHub.\n\n_1.6.0_\n\n1. Support for postgresql protocol parsing.\n2. Support for HTTP2 protocol parsing.\n3. Support for DNS protocol parsing.\n4. Support for GnuTLS.\n\n## 🤝 Feedback and Contributions\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e If you encounter any issues or bugs while using the tool, please feel free to\n\u003e ask questions in the issue tracker.\n\n## 🙇‍ Special Thanks\n\nDuring the development of kyanos, some code was borrowed from the following\nprojects:\n\n- [eCapture](https://ecapture.cc/zh/)\n- [pixie](https://github.com/pixie-io/pixie)\n- [ptcpdump](https://github.com/mozillazg/ptcpdump)\n\n## 🗨️ Contacts\n\nFor more detailed inquiries, you can use the following contact methods:\n\n- **My Email:** [hengyoush1@163.com](mailto:hengyoush1@163.com)\n- **My Blog:** [http://blog.deadlock.cloud](http://blog.deadlock.cloud/)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=hengyoush/kyanos\u0026type=Date)](https://star-history.com/#hengyoush/kyanos\u0026Date)\n\n[Back to top](#top)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhengyoush%2Fkyanos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhengyoush%2Fkyanos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhengyoush%2Fkyanos/lists"}