Browse Source

improve ton output

pull/1943/head
Anton Kaliaev 8 years ago
parent
commit
fd3dc5f5a7
No known key found for this signature in database GPG Key ID: 7B6881D965918214
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      tm-monitor/README.md
  2. +3
    -3
      tm-monitor/ton.go

+ 1
- 1
tm-monitor/README.md View File

@ -81,7 +81,7 @@ POST requests. The JSONRPC methods are also exposed over websocket.
1. Currently we get IPs and dial, but should reverse so the nodes dial the netmon, both for node privacy and easier reconfig (validators changing ip/port).
2. Uptime over last day, month, year (Q: how do I get this?)
3. `statsd` metrics
3. `statsd` output (plugin?)
4. log metrics for charts (Q: what charts?)
5. show network size (Q: how do I get the number?)
6. metrics RPC (Q: do we need this?)

+ 3
- 3
tm-monitor/ton.go View File

@ -59,13 +59,13 @@ func (o *Ton) Stop() {
func (o *Ton) printHeader() {
n := o.monitor.Network
fmt.Fprintf(o.Output, "%v up %.2f\n", n.UptimeData.StartTime, n.UptimeData.Uptime)
fmt.Fprintf(o.Output, "%v up %.2f%%\n", n.UptimeData.StartTime, n.UptimeData.Uptime)
fmt.Println()
fmt.Fprintf(o.Output, "Height: %d\n", n.Height)
fmt.Fprintf(o.Output, "Avg block time: %.3f ms\n", n.AvgBlockTime)
fmt.Fprintf(o.Output, "Avg Tx throughput: %.0f per sec\n", n.AvgTxThroughput)
fmt.Fprintf(o.Output, "Avg tx throughput: %.0f per sec\n", n.AvgTxThroughput)
fmt.Fprintf(o.Output, "Avg block latency: %.3f ms\n", n.AvgBlockLatency)
fmt.Fprintf(o.Output, "Nodes: %d from %d online (health: %s) Validators: %d\n", n.NumNodesMonitoredOnline, n.NumNodesMonitored, n.GetHealthString(), n.NumValidators)
fmt.Fprintf(o.Output, "Active nodes: %d/%d (health: %s) Validators: %d\n", n.NumNodesMonitoredOnline, n.NumNodesMonitored, n.GetHealthString(), n.NumValidators)
}
func (o *Ton) printTable() {


Loading…
Cancel
Save