From 8b6e002e0a1f80a69bb7f53d4802b7771fcac799 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Thu, 22 Oct 2015 21:05:46 +0100 Subject: [PATCH] Disable tcp stats collection Fixes #938 --- container/libcontainer/helpers.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/container/libcontainer/helpers.go b/container/libcontainer/helpers.go index d274161e..534ad87c 100644 --- a/container/libcontainer/helpers.go +++ b/container/libcontainer/helpers.go @@ -98,7 +98,8 @@ func GetStats(cgroupManager cgroups.Manager, rootFs string, pid int) (*info.Cont stats.Network.Interfaces = append(stats.Network.Interfaces, netStats...) } - t, err := tcpStatsFromProc(rootFs, pid, "net/tcp") + // Commenting out to disable: too CPU intensive + /*t, err := tcpStatsFromProc(rootFs, pid, "net/tcp") if err != nil { glog.V(2).Infof("Unable to get tcp stats from pid %d: %v", pid, err) } else { @@ -110,7 +111,7 @@ func GetStats(cgroupManager cgroups.Manager, rootFs string, pid int) (*info.Cont glog.V(2).Infof("Unable to get tcp6 stats from pid %d: %v", pid, err) } else { stats.Network.Tcp6 = t6 - } + }*/ } // For backwards compatibility.