1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 01:43:22 +08:00

Show cpu and memory stats of every node

This commit is contained in:
Jonathan Leibiusky @xetorthio
2016-11-18 13:52:47 -03:00
parent bc7dbead33
commit 8b0749a9ba
6 changed files with 121 additions and 7 deletions

View File

@@ -144,6 +144,13 @@ func LoadSessionsFromDisk() error {
for _, s := range sessions {
timeLeft := s.ExpiresAt.Sub(time.Now())
CloseSessionAfter(s, timeLeft)
// start collecting stats for every instance
for _, i := range s.Instances {
// wire the session back to the instance
i.session = s
go i.CollectStats()
}
}
}
file.Close()