diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-11-19 19:20:50 -0500 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-11-22 15:26:23 +0000 |
| commit | 89440e9795a212ec972bf50c73d91fa5a2775864 (patch) | |
| tree | 60b148045759da35ec5169593acb84f06a7751d7 /internal/frontend/server.go | |
| parent | 22392b8d52d95d38cd439a8bc1dd70d04d655efb (diff) | |
| download | go-x-pkgsite-89440e9795a212ec972bf50c73d91fa5a2775864.tar.xz | |
internal/frontend: add cgoup memory info
Change-Id: Ifc8796ed232876a42ca1957283621815a7f53cdc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/365659
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/frontend/server.go')
| -rw-r--r-- | internal/frontend/server.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/frontend/server.go b/internal/frontend/server.go index c64e59fa..63945fec 100644 --- a/internal/frontend/server.go +++ b/internal/frontend/server.go @@ -246,6 +246,14 @@ func (s *Server) installDebugHandlers(handle func(string, http.Handler)) { memrow("Process RSS", pm.RSS) memrow("System Total", sm.Total) memrow("System Used", sm.Used) + cm, err := memory.ReadCgroupStats() + if err != nil { + row("CGroup Stats", "unavailable") + } else { + for k, v := range cm { + memrow("CGroup "+k, v) + } + } fmt.Fprintf(w, "</table>\n") fmt.Fprintf(w, "</body></html>\n") |
