netlogfmt

command
v1.52.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Overview

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
=========================================================================================

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL