{"id":15056961,"url":"https://github.com/mtardy/bpfmemapie","last_synced_at":"2025-04-10T05:05:37.055Z","repository":{"id":245073771,"uuid":"816983377","full_name":"mtardy/bpfmemapie","owner":"mtardy","description":"A tool to render a pie chart of memory usage (bytes_memlock) of BPF maps on the system 🥧","archived":false,"fork":false,"pushed_at":"2024-06-19T11:44:49.000Z","size":7,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T06:12:09.279Z","etag":null,"topics":["bpf","ebpf","maps","memory","pie"],"latest_commit_sha":null,"homepage":"","language":"Go","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/mtardy.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-06-18T19:22:06.000Z","updated_at":"2025-02-05T01:52:40.000Z","dependencies_parsed_at":"2024-06-19T15:52:05.457Z","dependency_job_id":"8aebfde3-5cda-4f08-b745-aceca0afc746","html_url":"https://github.com/mtardy/bpfmemapie","commit_stats":null,"previous_names":["mtardy/bpfmemapie"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2Fbpfmemapie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2Fbpfmemapie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2Fbpfmemapie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtardy%2Fbpfmemapie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtardy","download_url":"https://codeload.github.com/mtardy/bpfmemapie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161278,"owners_count":21057555,"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","ebpf","maps","memory","pie"],"created_at":"2024-09-24T21:59:16.478Z","updated_at":"2025-04-10T05:05:37.027Z","avatar_url":"https://github.com/mtardy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bpfmemapie 🥧\n\nA tool to render a pie chart of memory usage (bytes_memlock) of BPF maps on the\nsystem. Sorry for the naming, it's for **mem**apie, me**map**ie and mema**pie**,\nso BPF mem map pie.\n\n## Installation\n\n```shell\ngo install github.com/mtardy/bpfmemapie@latest\n```\n\n## Usage\n\nIt needs bpftool to be installed and to execute as root for bpftool to list the\nmaps and their info.\n\n```shell\nsudo bpfmemapie\n```\n\nAfter opening http://localhost:8080 (you can change the port with `--port`), you\nshould see something like this:\n\n\u003cimg width=\"1292\" alt=\"output of bpfmemapie: a pie chart with the maps memory\" \n  src=\"https://github.com/mtardy/bpfmemapie/assets/11256051/3b987551-34d2-4270-9421-4b84eff56415\"\u003e\n\nThe pie chart is interactive, you can click on the legend to hide/show entries\nor hover on the pie to see the tooltip. You can also change how the \"others\"\ncategory using the `threshold` URL query, for example \nhttp://localhost:8080/?threshold=1.\n\n## Alternative\n\nIf you don't need the pie chart part, you can just use `bpftool` and `jq` to\nsee the same statistics:\n\n```shell\nsudo bpftool map -j | jq ' group_by(.name) | map({name: .[0].name, total_bytes_memlock: map(.bytes_memlock | tonumber) | add, maps: length}) | sort_by(.total_bytes_memlock)'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtardy%2Fbpfmemapie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtardy%2Fbpfmemapie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtardy%2Fbpfmemapie/lists"}