go-libp2p-daemon icon indicating copy to clipboard operation
go-libp2p-daemon copied to clipboard

Print stats/diagnostics on system signal

Open raulk opened this issue 6 years ago • 2 comments
trafficstars

For debugging the state of the daemon, it could be useful to add a hook to catch SIGUSR2 (as we plan to use SIGUSR1 for config reload) that prints statistics/diagnostics to stdout/stderr.

We can output at least:

  • [x] dht.RoutingTable.Print()
  • [x] active connections with peers.
  • [x] active streams with peers, including the protocol id.
  • [ ] pubsub subscriptions.

For now, the DHT routing table would suffice, as we actually do need it kind of immediately.

raulk avatar Feb 14 '19 13:02 raulk

First pass, we dump the routing table on SIGUSR1.

vyzo avatar Feb 14 '19 17:02 vyzo

#101 implemented peer and stream dumps.

vyzo avatar Apr 12 '19 14:04 vyzo