lstf

The aggregated TCP connections printer in Linux

  • 所有者: yuuki/lstf
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

lstf

Build Status
Latest Version
Go Report Card
License

lstf 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.

friend: yuuki/lsconntrack

Features

  • Distinction of active open and passive open
  • Print also the number of connections of each flows (the absolute values are meaningless)
  • Go portability
  • JSON support
  • TCP support only

Installation

Download binary from GitHub Releases

https://github.com/yuuki/lstf/releases

How to use

HTTP requests --> Web:80 --> MySQL:3306

$ lstf -n
Local Address:Port   <-->   Peer Address:Port     Connections
10.0.1.9:many        -->    10.0.1.10:3306        22
10.0.1.9:many        -->    10.0.1.11:3306        14
10.0.2.10:22         <--    192.168.10.10:many    1
10.0.1.9:80          <--    10.0.2.13:many        120
10.0.1.9:80          <--    10.0.2.14:many        202
  • --> indicates active open
  • <-- indicates passive open

Sort flows by the number of connection.

$ lstf -n, sort -nrk4

JSON format

$ lstf --json, jq -r -M '.'
[
  {
    "direction": "active",
    "local": {
      "name", "app01.local",
      "addr": "10.0.1.9",
      "port": "many"
    },
    "peer": {
      "name", "db01.local",
      "addr": "10.0.100.1",
      "port": "3306"
    },
    "connections": 20
  },
  {
    "direction": "passive",
    "local": {
      "name", "app01.local",
      "addr": "10.0.1.9",
      "port": "80"
    },
    "peer": {
      "name", "web01.local",
      "addr": "10.0.200.1",
      "port": "many"
    },
    "connections": 27
  },
  ...
]

License

[MIT][license]

Author

yuuki

主要指标

概览
名称与所有者yuuki/lstf
主编程语言Go
编程语言Makefile (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2018-03-04 13:24:35
推送于2021-03-14 10:22:32
最后一次提交2021-03-14 19:22:24
发布数17
最新版本名称v0.7.2 (发布于 )
第一版名称v0.1.0 (发布于 )
用户参与
星数160
关注者数6
派生数11
提交数190
已启用问题?
问题数1
打开的问题数0
拉请求数30
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?