{"id":13705909,"url":"https://github.com/hrbrmstr/archinfo","last_synced_at":"2025-03-21T12:30:54.102Z","repository":{"id":141238034,"uuid":"347448273","full_name":"hrbrmstr/archinfo","owner":"hrbrmstr","description":"𖼆 Returns a list of running processes and the architecture (x86_64/arm64) they are running under.","archived":false,"fork":false,"pushed_at":"2022-10-06T09:10:19.000Z","size":51,"stargazers_count":29,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T01:11:13.917Z","etag":null,"topics":["apple-silicon","arm64","macos"],"latest_commit_sha":null,"homepage":"","language":"C","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/hrbrmstr.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-13T18:29:04.000Z","updated_at":"2024-05-29T18:39:41.000Z","dependencies_parsed_at":"2024-01-14T20:17:10.693Z","dependency_job_id":"762ce958-d0ba-492c-b1a0-0bfe424b03d7","html_url":"https://github.com/hrbrmstr/archinfo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Farchinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Farchinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Farchinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrbrmstr%2Farchinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrbrmstr","download_url":"https://codeload.github.com/hrbrmstr/archinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244799213,"owners_count":20512206,"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":["apple-silicon","arm64","macos"],"created_at":"2024-08-02T22:00:49.521Z","updated_at":"2025-03-21T12:30:53.816Z","avatar_url":"https://github.com/hrbrmstr.png","language":"C","funding_links":["https://www.patreon.com/posts/45121749"],"categories":["C"],"sub_categories":[],"readme":"#  archinfo\n\nReturns a list of running processes and the architecture they are running under.\n\nApple M1/Apple Silicon/arm64 macOS can run x86_64 programs via Rosetta and most M1 systems currently (~March 2021) very likely run a mix of x86_64 and arm64 processes.\n\nActivity Monitor can show the architecture, but command line tools such as `ps` and `top` do not due to Apple hiding the details of the proper `sysctl()` incantations necessary to get this info.\n\nPatrick Wardle reverse-engineered Activity Monitor — \u003chttps://www.patreon.com/posts/45121749\u003e — and I slapped that hack into a bare-bones command line utility `archinfo`.\n\nIt returns columnar output or JSON (via `--json`) — that will work nicely with `jq` — of running processes and their respective architectures.\n\n## Installation\n\nBuild from source, grab from the releases, or use `homebrew`:\n\n```bash\nbrew install hrbrmstr/tap/archinfo\n```\n\n## Usage\n\n```bash\n$ archinfo\n...\n   5949  arm64 /System/Library/Frameworks/AudioToolbox.framework/AudioComponentRegistrar\n   5923  arm64 /System/Library/CoreServices/LocationMenu.app/Contents/MacOS/LocationMenu\n   5901 x86_64 /Library/Application Support/Adobe/Adobe Desktop Common/IPCBox/AdobeIPCBroker.app/Contents/MacOS/AdobeIPCBroker\n   5873  arm64 /Applications/Utilities/Adobe Creative Cloud Experience/CCXProcess/CCXProcess.app/Contents/MacOS/../libs/Adobe_CCXProcess.node\n   5863  arm64 /bin/sleep\n   5861 x86_64 /Applications/Tailscale.app/Contents/PlugIns/IPNExtension.appex/Contents/MacOS/IPNExtension\n   5855 x86_64 /Applications/Elgato Control Center.app/Contents/MacOS/Elgato Control Center\n   5852 x86_64 /Applications/Tailscale.app/Contents/MacOS/Tailscale\n   5849  arm64 /System/Library/CoreServices/TextInputSwitcher.app/Contents/MacOS/TextInputSwitcher\n...\n```\n\n```bash\n$ archinfo --pid $(pgrep keyboardservicesd)\n  60298 x86_64 /usr/libexec/keyboardservicesd\n\n$ archinfo --json --pid $(pgrep keyboardservicesd)\n{\"pid\":60298,\"arch\":\"x86_64\",\"name\":\"/usr/libexec/keyboardservicesd\"}\n```\n\n```bash\narchinfo --json | jq -r --slurp 'group_by(.arch)[] | { arch: .[0].arch, count: length } | [ .arch, .count ] | @tsv'\n## arm64   382\n## x86_64  12\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Farchinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrbrmstr%2Farchinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrbrmstr%2Farchinfo/lists"}