skycoin / skywire

Skywire Node implementation
73 stars 45 forks source link

More statistics for UT & dmsg discovery #1812

Closed 0pcom closed 2 months ago

0pcom commented 2 months ago
$ go run cmd/skywire/skywire.go cli ut --help
query uptime tracker

http://ut.skywire.skycoin.com/uptimes?v=v2

Check local visor daily uptime percent with:
 skywire-cli ut -k $(skywire-cli visor pk)n
Set cache file location to "" to avoid using cache files

Flags:
  -m, --cfa int      update cache files if older than n minutes (default 5)
      --cfu string   UT cache file location. (default "/tmp/ut.json")
  -n, --min int      list visors meeting minimum uptime (default 75)
  -o, --on           list currently online visors
  -k, --pk string    check uptime for the specified key
  -s, --stats        count the number of results
  -t, --stats2       count of versions
  -u, --url string   specify alternative uptime tracker url (default "http://ut.skywire.skycoin.com")

Showing the version statistics for every visor in the uptime tracker

[user@linux skywire]$ go run cmd/skywire/skywire.go cli ut -t
1518 v1.3.19
 470 v1.3.17
 446 null
 226 v1.3.21
 220 v1.3.15
 148 v1.3.13
  55 v1.3.10
  51 v1.3.7
  47 v1.3.11
  22 v1.3.6
  13 v1.3.8
   9 v1.3.20
   8 v1.0.1
   8 v1.3.4
   5 v1.1.0
   4 v1.3.14
   4 v1.3.16
   2 unknown
   1 v1.3.9

Showing the version statistics for every online visor in the uptime tracker

[user@linux skywire]$ go run cmd/skywire/skywire.go cli ut -ot
1325 v1.3.19
 398 null
 349 v1.3.17
 214 v1.3.21
 195 v1.3.15
  71 v1.3.13
  51 v1.3.10
  46 v1.3.7
  36 v1.3.11
  22 v1.3.6
  13 v1.3.8
   8 v1.0.1
   8 v1.3.4
   6 v1.3.20
   5 v1.1.0
   4 v1.3.16
   3 v1.3.14
   1 v1.3.9
$  go run cmd/skywire/skywire.go cli mdisc | head
02000d6d4b1286c42376490d227acbce9c729f43154ebf0b3b1c69a3d35699510c
02001319d25a66609b64cc389bd0dcee6d5b4ab93bd139186c47d1d6cbe955e7e1
0200389579ed15343725d7d0c78890875b15af7ba965a84e53472eff7b5eb5939f
0200479d96f48aa57b03b745808808565fce636361364141869a217fcfa4634fee
02008f71595e5b1267fab5e337e135650fa22164a4ac489546b59492413d9da10d
0200b3c311dba7c90ae6661362534a9e68f2428ca89631cd5fff93143a283a1905
0200b9720b9ea5ead3893c7aa6f7b8b62d51807d869bd79e27f1065dd047bf28f7
0200cbd7e616128b122288d27da84276842952ecf2916fe6e41f3b811341636113
020131ef17620488c31e1c6c8ee3a2cdf24ac037f034be1b1b148767f7330fd3e6
0201392ea1f94bb40140ef6099eb825ad540f54d0b7dd80c2fdd9ebefb30c6fba8
$  go run cmd/skywire/skywire.go cli mdisc -s
4626 dmsg clients
$  go run cmd/skywire/skywire.go cli mdisc | wc -l
4626