Skip to content

Commit 81aa0d7

Browse files
committed
Merge pull request #939 from jimmidyson/disable-tcp-stats
Disable tcp stats collection
2 parents 4a20353 + 8b6e002 commit 81aa0d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

container/libcontainer/helpers.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ func GetStats(cgroupManager cgroups.Manager, rootFs string, pid int) (*info.Cont
9898
stats.Network.Interfaces = append(stats.Network.Interfaces, netStats...)
9999
}
100100

101-
t, err := tcpStatsFromProc(rootFs, pid, "net/tcp")
101+
// Commenting out to disable: too CPU intensive
102+
/*t, err := tcpStatsFromProc(rootFs, pid, "net/tcp")
102103
if err != nil {
103104
glog.V(2).Infof("Unable to get tcp stats from pid %d: %v", pid, err)
104105
} else {
@@ -110,7 +111,7 @@ func GetStats(cgroupManager cgroups.Manager, rootFs string, pid int) (*info.Cont
110111
glog.V(2).Infof("Unable to get tcp6 stats from pid %d: %v", pid, err)
111112
} else {
112113
stats.Network.Tcp6 = t6
113-
}
114+
}*/
114115
}
115116

116117
// For backwards compatibility.

0 commit comments

Comments
 (0)