{"id":22782346,"url":"https://github.com/cppcoffee/c-fdleak","last_synced_at":"2026-04-27T22:33:07.391Z","repository":{"id":265692809,"uuid":"896493120","full_name":"cppcoffee/c-fdleak","owner":"cppcoffee","description":"Dynamic track C/C++ application file descriptor leak.","archived":false,"fork":false,"pushed_at":"2024-12-22T11:36:52.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T14:42:07.749Z","etag":null,"topics":["aya","ebpf","fdleak","rust","uprobes"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cppcoffee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2024-11-30T14:07:40.000Z","updated_at":"2024-12-22T11:36:29.000Z","dependencies_parsed_at":"2024-11-30T15:24:39.250Z","dependency_job_id":"df4235ea-3ccc-4900-9aab-6d84d9b33f3e","html_url":"https://github.com/cppcoffee/c-fdleak","commit_stats":null,"previous_names":["cppcoffee/c-fdleak"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cppcoffee/c-fdleak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-fdleak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-fdleak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-fdleak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-fdleak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppcoffee","download_url":"https://codeload.github.com/cppcoffee/c-fdleak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-fdleak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aya","ebpf","fdleak","rust","uprobes"],"created_at":"2024-12-11T21:11:07.563Z","updated_at":"2026-04-27T22:33:07.375Z","avatar_url":"https://github.com/cppcoffee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c-fdleak\n\n## Prerequisites\n\n1. stable rust toolchains: `rustup toolchain install stable`\n1. nightly rust toolchains: `rustup toolchain install nightly --component rust-src`\n1. (if cross-compiling) rustup target: `rustup target add ${ARCH}-unknown-linux-musl`\n1. (if cross-compiling) LLVM: (e.g.) `brew install llvm` (on macOS)\n1. (if cross-compiling) C toolchain: (e.g.) [`brew install filosottile/musl-cross/musl-cross`](https://github.com/FiloSottile/homebrew-musl-cross) (on macOS)\n1. bpf-linker: `cargo install bpf-linker` (`--no-default-features` on macOS)\n\n## Build\n\n```shell\n$ AYA_BUILD_EBPF=true cargo build --release\n```\n\nor\n\n```shell\n$ make\n```\n\n## Cross-compiling on macOS\n\nCross compilation should work on both Intel and Apple Silicon Macs.\n\n```shell\nCC=${ARCH}-linux-musl-gcc cargo build --package c-fdleak --release \\\n  --target=${ARCH}-unknown-linux-musl \\\n  --config=target.${ARCH}-unknown-linux-musl.linker=\\\"${ARCH}-linux-musl-gcc\\\"\n```\nThe cross-compiled program `target/${ARCH}-unknown-linux-musl/release/c-fdleak` can be\ncopied to a Linux server or VM and run there.\n\n## Usage\n\n```shell\nUsage: c-fdleak [OPTIONS] --pid \u003cPID\u003e\n\nOptions:\n  -p, --pid \u003cPID\u003e          pid of the process\n  -t, --timeout \u003cTIMEOUT\u003e  timeout in seconds [default: 30]\n  -o, --output \u003cOUTPUT\u003e    output file [default: /tmp/fdleak.out]\n  -v, --verbose            verbose mode\n  -h, --help               Print help\n  -V, --version            Print version\n```\n\n### Example:\n\n```shell\n# ./target/release/c-fdleak --pid 5382\n```\n\nGenerating flame graphs:\n\n```shell\n# ./FlameGraph/flamegraph.pl /tmp/fdleak.out \u003e /tmp/1.svg\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fc-fdleak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppcoffee%2Fc-fdleak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fc-fdleak/lists"}