Show status of global announce server (fixes #71)

This commit is contained in:
Jakob Borg
2014-04-16 17:36:09 +02:00
parent 31bfd8c039
commit b802cb1e36
4 changed files with 69 additions and 36 deletions

View File

@@ -168,6 +168,9 @@ func restGetSystem(w http.ResponseWriter) {
res["goroutines"] = runtime.NumGoroutine()
res["alloc"] = m.Alloc
res["sys"] = m.Sys
if discoverer != nil {
res["extAnnounceOK"] = discoverer.ExtAnnounceOK()
}
cpuUsageLock.RLock()
var cpusum float64
for _, p := range cpuUsagePercent {