{"id":13491089,"url":"https://github.com/silenceshell/topic","last_synced_at":"2026-01-17T17:08:02.722Z","repository":{"id":46699403,"uuid":"402706212","full_name":"silenceshell/topic","owner":"silenceshell","description":"top in container.","archived":false,"fork":false,"pushed_at":"2022-10-08T14:15:54.000Z","size":234,"stargazers_count":144,"open_issues_count":7,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-31T04:35:04.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silenceshell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-03T08:52:26.000Z","updated_at":"2024-07-21T08:03:08.000Z","dependencies_parsed_at":"2022-09-13T00:33:18.541Z","dependency_job_id":null,"html_url":"https://github.com/silenceshell/topic","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenceshell%2Ftopic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenceshell%2Ftopic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenceshell%2Ftopic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silenceshell%2Ftopic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silenceshell","download_url":"https://codeload.github.com/silenceshell/topic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245989360,"owners_count":20705813,"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":[],"created_at":"2024-07-31T19:00:53.450Z","updated_at":"2026-01-17T17:08:02.710Z","avatar_url":"https://github.com/silenceshell.png","language":"Go","funding_links":[],"categories":["Go","Docker-Tools"],"sub_categories":[],"readme":"# topic\n\ntop in container.\n\nRunning the original `top` command in a container will not get information of the container, many metrics like uptime, users, load average, tasks, cpu, memory, are about the host in fact. \n`topic`(**top** **i**n **c**ontainer) will retrieve those metrics from container instead, and shows the status of the container, not the host.\n\nBelow shows a container of 2 cpu and 2 Gi running status when stress with `--cpu 2`.\n\n![topic.png](doc/image/topic.png)\n\n## How to use\n\nDownload `topic` from GitHub [release page](https://github.com/silenceshell/topic/releases) to the container which you want to inspect, and add `x` attribute to the binary, then run the binary!\n\nOr just create a container for a try:\n\n```sh\n# start a 2c2g container\n$ docker run -it --name topic --rm --cpus 2 --memory 2g silenceshell/topic bash\n# run topic in this container\nroot@04065eeff138:/# topic\n```\n\n\n## How to build\n\nRun `make build` for linux and amd64. `topic` only support on linux. If you want to run on other architectures, `GOARCH` is need to be set. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilenceshell%2Ftopic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilenceshell%2Ftopic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilenceshell%2Ftopic/lists"}