mirror of https://github.com/containers/podman.git
Fix swapped NetInput/-Output stats
Fix swapped NetInput and NetOutput container stats. This resulted in `podman stats` showing outgoing traffic as NetInput and incoming traffic as NetOutput. This change might be visible or cause problems for users who are actively relying on those stats for monitoring reasons. [NO NEW TEST NEEDED] Signed-off-by: Ingo Becker <ingo@orgizm.net>
This commit is contained in:
parent
fd142ef5f4
commit
75f6a1d596
|
|
@ -82,8 +82,8 @@ func (c *Container) getPlatformContainerStats(stats *define.ContainerStats, prev
|
|||
|
||||
// Handle case where the container is not in a network namespace
|
||||
if netStats != nil {
|
||||
stats.NetInput = netStats.TxBytes
|
||||
stats.NetOutput = netStats.RxBytes
|
||||
stats.NetInput = netStats.RxBytes
|
||||
stats.NetOutput = netStats.TxBytes
|
||||
} else {
|
||||
stats.NetInput = 0
|
||||
stats.NetOutput = 0
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ func (c *Container) getPlatformContainerStats(stats *define.ContainerStats, prev
|
|||
stats.PerCPU = cgroupStats.CpuStats.CpuUsage.PercpuUsage
|
||||
// Handle case where the container is not in a network namespace
|
||||
if netStats != nil {
|
||||
stats.NetInput = netStats.TxBytes
|
||||
stats.NetOutput = netStats.RxBytes
|
||||
stats.NetInput = netStats.RxBytes
|
||||
stats.NetOutput = netStats.TxBytes
|
||||
} else {
|
||||
stats.NetInput = 0
|
||||
stats.NetOutput = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue