tailscale.comtailscale.com/cmd/netlogfmt

netlogfmt command

netlogfmt parses a stream of JSON log messages from stdin and formats the network traffic logs produced by "tailscale.com/wgengine/netlog" according to the schema in "tailscale.com/types/netlogtype.Message" in a more humanly readable format.

Example usage:

$ cat netlog.json | go run tailscale.com/cmd/netlogfmt
=========================================================================================
NodeID: n123456CNTRL
Logged: 2022-10-13T20:23:10.165Z
Window: 2022-10-13T20:23:09.644Z (5s)
---------------------------------------------------  Tx[P/s]  Tx[B/s]  Rx[P/s]    Rx[B/s]
VirtualTraffic:                                       16.80    1.64Ki   11.20      1.03Ki
    TCP:    100.109.51.95:22 -> 100.85.80.41:42912    16.00    1.59Ki   10.40   1008.84
    TCP: 100.109.51.95:21291 -> 100.107.177.2:53133    0.40   27.60      0.40     24.20
    TCP: 100.109.51.95:21291 -> 100.107.177.2:53134    0.40   23.40      0.40     24.20
PhysicalTraffic:                                      16.80    2.32Ki   11.20      1.48Ki
                100.85.80.41 -> 192.168.0.101:41641   16.00    2.23Ki   10.40      1.40Ki
               100.107.177.2 -> 192.168.0.100:41641    0.80   83.20      0.80     83.20
=========================================================================================
Version
v1.82.5 (latest)
Published
Apr 17, 2025
Platform
linux/amd64
Imports
21 packages
Last checked
11 hours ago

Tools for package owners.