{"id":22021865,"url":"https://github.com/mezantrop/sockstat","last_synced_at":"2025-05-07T06:42:52.705Z","repository":{"id":206823666,"uuid":"716739602","full_name":"mezantrop/sockstat","owner":"mezantrop","description":"FreeBSD-like sockstat for macOS using libproc","archived":false,"fork":false,"pushed_at":"2024-06-26T14:55:24.000Z","size":255,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T07:22:21.741Z","etag":null,"topics":["libproc","macos","open-ports","sockets","sockstat"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mezantrop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-09T19:14:44.000Z","updated_at":"2025-02-19T21:16:55.000Z","dependencies_parsed_at":"2024-06-12T08:33:16.996Z","dependency_job_id":"c871245d-2b91-4e79-bfec-3ed388b8d3f2","html_url":"https://github.com/mezantrop/sockstat","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"9c4550507087bf1ed8976016e127c46e7939c61b"},"previous_names":["mezantrop/sockstat"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mezantrop%2Fsockstat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mezantrop%2Fsockstat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mezantrop%2Fsockstat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mezantrop%2Fsockstat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mezantrop","download_url":"https://codeload.github.com/mezantrop/sockstat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252831098,"owners_count":21810777,"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":["libproc","macos","open-ports","sockets","sockstat"],"created_at":"2024-11-30T06:15:41.862Z","updated_at":"2025-05-07T06:42:52.701Z","avatar_url":"https://github.com/mezantrop.png","language":"C","funding_links":["https://www.buymeacoffee.com/mezantrop"],"categories":[],"sub_categories":[],"readme":"# Sockstat for macOS\n\n[![CodeQL](https://github.com/mezantrop/sockstat/actions/workflows/codeql.yml/badge.svg)](https://github.com/mezantrop/sockstat/actions/workflows/codeql.yml)\n[![C/C++ CI](https://github.com/mezantrop/sockstat/actions/workflows/c-cpp-macos.yml/badge.svg)](https://github.com/mezantrop/sockstat/actions/workflows/c-cpp-macos.yml)\n\n## FreeBSD-like sockstat for macOS using libproc\n\n\u003ca href=\"https://www.buymeacoffee.com/mezantrop\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n![sockstat](media/sockstat.png)\n\n### Download\n\nSee releases and [Download](https://github.com/mezantrop/sockstat/releases) a precompiled universal binary\n\n### Build from sources\n\nYou can compile everything from sources. To install `sockstat` into `bin` directory under `/usr/local`, run:\n\n```sh\nmake install clean\n```\n\nIf using a custom installation path, define `PREFIX`:\n\n```sh\nmake install clean PREFIX=/path/to/install\n```\n\nTo build a universal binary suitable both for x64 and M-processors:\n\n```sh\nmake universal install clean\n```\n\nTo deinstall:\n\n```sh\nmake uninstall\n```\n\n### Usage\n\n```sh\nUsage: sockstat [-46TUklnrquhv]\n\n    -4  Show AF_INET (IPv4) sockets\n    -6  Show AF_INET6 (IPv6) sockets\n    -T  Show TCP protocol\n    -U  Show UDP protocol\n    -k  Show AF_SYSTEM (Kernel) sockets\n    -n  Show AF_NDRV sockets\n    -r  Show AF_ROUTE sockets\n    -u  Show AF_LOCAL (UNIX) sockets\n\n    -l  Show only LISTENing sockets\n    -q  Quiet mode - suppress header\n\n    -h  This help message\n    -v  Show program version\n```\n\nRun `sockstat` as `root` to see **all**, (not only the current user's) sockets\n\n### Performance\n\nI do not think, performance plays here any role, but anywhy: the same good old MacBook Air late 2015, idle state.\nGraphs `lsof` vs `sockstat` - the lower, the better.\n\n![lsof](media/lsof_time.png) ![sockstat](media/sockstat_time.png)\n\nIf you have an idea, a question, or found a problem, do not hesitate to open an\n[issue](https://github.com/mezantrop/sockstat/issues) or mail me: Mikhail Zakharov \u003czmey20000@yahoo.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmezantrop%2Fsockstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmezantrop%2Fsockstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmezantrop%2Fsockstat/lists"}