• Stars
    star
    159
  • Rank 235,916 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The aggregated TCP flows printer in Linux

lstf

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

Author

yuuki

More Repositories

1

droot

The super-simple chroot-based application container engine.
Go
209
star
2

diamondb

[WIP] DiamonDB: Rebuild of time series database on AWS.
Go
103
star
3

shawk

[PoC] A socket-based tracing system for discovering network service dependencies. (renamed from transtracer)
Go
52
star
4

gokc

Yet Another Keepalived Syntax Checker in Golang.
Go
51
star
5

lsconntrack

The Linux netfilter conntrack-based connection flows pretty printer.
Go
41
star
6

yuuki-learned

What I learned.
34
star
7

go-conntracer-bpf

Go library using eBPF to trace network flow events
C
34
star
8

grabeni

Grabeni - An ops-friendly AWS Elastic Network Interface (ENI) attachment grabbing tool.
Go
21
star
9

capze

A tool to make Capistrano-based directory structure
Go
21
star
10

opstools

Tools for fast server operation
Perl
12
star
11

binrep

The static binary repository manager
Go
12
star
12

syscall-study

Linux system calls study
Rust
10
star
13

xtsdb

[PoC] Xtsdb: A scalable time series database on two tiers of Redis and Cassandra.
Go
9
star
14

Monitorel

A Web API providing server performance metrics graphs
CSS
6
star
15

dockerized-perl-app

How to dockerized perl web application
JavaScript
5
star
16

dotfiles

My dotfiles
Shell
5
star
17

mftracer

[WIP] A CLI visualizer for distributed dependency graph by TCP port tracing
Go
5
star
18

WebService-Qiita

Perl wrapper for Qiita API
Perl
4
star
19

perl-local-lib-path.vim

perl-local-lib-path is a helper for vim path
Vim Script
4
star
20

redis-cluster-tutorial

Playground for Redis cluster tutorial
Ruby
4
star
21

cfstacker

A simple AWS CloudFormation stacks manager
Python
3
star
22

mkr-check

A CLI to run check commands in mackerel-agent.conf.
Go
2
star
23

dockerfiles

My dockerfiles
Dockerfile
2
star
24

bootstrap

Bootstrap script for clean OS to feel better
Shell
2
star
25

ansible-operation-helper

Shell
2
star
26

paper-tex-en-boilerplate

The template for writing English paper in Tex.
TeX
2
star
27

albio

albio: A CLI tool to gracefully manage EC2 instances with ALB/NLB
Go
1
star
28

yuuki

yuuki's GitHub profile
1
star
29

Coteng

Coteng - Lightweight Teng
Perl
1
star
30

mackerel2route53

[WIP] Internal DNS on Route53 based on mackerel.io
Go
1
star
31

isucon5-qualifier

ใฏใ‚€ใกใ‚ƒใ‚“
Perl
1
star
32

p5-RRD-Rawish

A RRDtool wrapper with rawish interface in Perl
Perl
1
star
33

cookwares

Go
1
star
34

connperf

Network connections generator in Go.
Go
1
star
35

shawk-experiments

Go
1
star
36

blog.yuuk.io

http://blog.yuuk.io
Makefile
1
star
37

rlq

[WIP]
Rust
1
star
38

pgmonit

A web-based Postgres statistics monitor
Go
1
star
39

unite-perl-module.vim

Perl module source for unite.vim
Vim Script
1
star
40

syntastic-local-lib-path.vim

A plugin for syntastic to add local lib path such as local/lib/perl5.
Vim Script
1
star