{"id":22997717,"url":"https://github.com/cppcoffee/c-oncpu","last_synced_at":"2026-04-26T12:32:43.382Z","repository":{"id":268081325,"uuid":"903259387","full_name":"cppcoffee/c-oncpu","owner":"cppcoffee","description":"perf event process","archived":false,"fork":false,"pushed_at":"2024-12-14T06:12:35.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T13:24:24.032Z","etag":null,"topics":["aya","aya-ebpf","ebpf","rust"],"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-12-14T06:01:22.000Z","updated_at":"2024-12-20T16:06:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"8a09216b-ca58-47be-a1cf-619060dd7d5a","html_url":"https://github.com/cppcoffee/c-oncpu","commit_stats":null,"previous_names":["cppcoffee/c-oncpu"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cppcoffee/c-oncpu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-oncpu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-oncpu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-oncpu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-oncpu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppcoffee","download_url":"https://codeload.github.com/cppcoffee/c-oncpu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Fc-oncpu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32297895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: 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","aya-ebpf","ebpf","rust"],"created_at":"2024-12-15T06:08:09.440Z","updated_at":"2026-04-26T12:32:43.365Z","avatar_url":"https://github.com/cppcoffee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# c-oncpu\n\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\n## Build\n\n```shell\n$ AYA_BUILD_EBPF=true cargo build --release\n```\n\nor\n\n```shell\n$ make\n```\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-oncpu --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-oncpu` can be\ncopied to a Linux server or VM and run there.\n\n\n## Usage\n\n```shell\nUsage: c-oncpu [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/output.out]\n  -v, --verbose                verbose mode\n  -k, --kernel-threads-only    Kernel threads only (no user threads)\n  -f, --frequency \u003cFREQUENCY\u003e  sample frequency [default: 1000]\n  -h, --help                   Print help\n```\n\n\n### Example:\n\n```shell\n# ./target/release/c-oncpu --pid 58102\n```\n\nGenerating flame graphs:\n\n```shell\n# ./FlameGraph/flamegraph.pl /tmp/output.out \u003e /tmp/1.svg\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fc-oncpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppcoffee%2Fc-oncpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Fc-oncpu/lists"}