Added new metric mem_bytes that reports the number of bytes used by TCP/UDP memory

This commit is contained in:
Ken Herner 2015-09-09 14:05:16 -04:00
commit d4adef9881
2 changed files with 15 additions and 11 deletions

View file

@ -35,7 +35,7 @@ func TestSockStats(t *testing.T) {
// page size in bytes back from sockstat_linux. We get the page size from
// os here because this value can change from system to system. The value is
// 4096 by default from linux 2.4 onward.
if want, got := strconv.Itoa(os.Getpagesize()), sockStats["TCP"]["mem"]; want != got {
if want, got := strconv.Itoa(os.Getpagesize()), sockStats["TCP"]["mem_bytes"]; want != got {
t.Errorf("want sockstat sockets used %s, got %s", want, got)
}
}