{"id":21658345,"url":"https://github.com/yuuki/lstf","last_synced_at":"2025-04-12T07:44:00.890Z","repository":{"id":53783437,"uuid":"123790813","full_name":"yuuki/lstf","owner":"yuuki","description":"The aggregated TCP flows printer in Linux","archived":false,"fork":false,"pushed_at":"2021-03-14T10:22:32.000Z","size":1445,"stargazers_count":160,"open_issues_count":0,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-12T07:43:55.999Z","etag":null,"topics":["go","linux","netstat","tcp"],"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/yuuki.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}},"created_at":"2018-03-04T13:24:35.000Z","updated_at":"2024-08-30T19:06:46.000Z","dependencies_parsed_at":"2022-08-30T08:22:04.332Z","dependency_job_id":null,"html_url":"https://github.com/yuuki/lstf","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flstf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flstf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flstf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flstf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuuki","download_url":"https://codeload.github.com/yuuki/lstf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248536978,"owners_count":21120684,"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":["go","linux","netstat","tcp"],"created_at":"2024-11-25T09:29:07.765Z","updated_at":"2025-04-12T07:44:00.872Z","avatar_url":"https://github.com/yuuki.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# lstf\n[![Latest Version](http://img.shields.io/github/release/yuuki/lstf.svg?style=flat-square)](https://github.com/yuuki/lstf/releases)\n[![Go Report Card](https://goreportcard.com/badge/github.com/yuuki/lstf)](https://goreportcard.com/report/github.com/yuuki/lstf)\n[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)\n\nlstf prints `host flows` (aggregated network connection flows to the same source or destination ports) by Linux netlink and enables you to simply grasp the network relationship between localhost and other hosts.\n\nfriend: [yuuki/lsconntrack](https://github.com/yuuki/lsconntrack)\n\n## Features\n\n- Distinction of `active open` and `passive open`\n- Print also the number of connections of each flows (the absolute values are meaningless)\n- Go portability\n- JSON support\n- TCP support only\n\n## Installation\n\n### Download binary from GitHub Releases\n\n\u003chttps://github.com/yuuki/lstf/releases\u003e\n\n## How to use\n\nHTTP requests --\u003e Web:80 --\u003e MySQL:3306\n\n```shell\n$ lstf -n\nLocal Address:Port   \u003c--\u003e   Peer Address:Port     Connections\n10.0.1.9:many        --\u003e    10.0.1.10:3306        22\n10.0.1.9:many        --\u003e    10.0.1.11:3306        14\n10.0.2.10:22         \u003c--    192.168.10.10:many    1\n10.0.1.9:80          \u003c--    10.0.2.13:many        120\n10.0.1.9:80          \u003c--    10.0.2.14:many        202\n```\n\n- `--\u003e` indicates `active open`\n- `\u003c--` indicates `passive open`\n\nSort flows by the number of connection.\n\n```shell\n$ lstf -n | sort -nrk4\n```\n\n### JSON format\n\n```shell-session\n$ lstf --json | jq -r -M '.'\n[\n  {\n    \"direction\": \"active\",\n    \"local\": {\n      \"name\"| \"app01.local\",\n      \"addr\": \"10.0.1.9\",\n      \"port\": \"many\"\n    },\n    \"peer\": {\n      \"name\"| \"db01.local\",\n      \"addr\": \"10.0.100.1\",\n      \"port\": \"3306\"\n    },\n    \"connections\": 20\n  },\n  {\n    \"direction\": \"passive\",\n    \"local\": {\n      \"name\"| \"app01.local\",\n      \"addr\": \"10.0.1.9\",\n      \"port\": \"80\"\n    },\n    \"peer\": {\n      \"name\"| \"web01.local\",\n      \"addr\": \"10.0.200.1\",\n      \"port\": \"many\"\n    },\n    \"connections\": 27\n  },\n  ...\n]\n```\n\n## License\n\n[MIT](LICENSE)\n\n## Author\n\n[yuuki](https://github.com/yuuki)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuuki%2Flstf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuuki%2Flstf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuuki%2Flstf/lists"}