diff --git a/libpod/stats_freebsd.go b/libpod/stats_freebsd.go index fcc0985597..e2ec9516cf 100644 --- a/libpod/stats_freebsd.go +++ b/libpod/stats_freebsd.go @@ -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 diff --git a/libpod/stats_linux.go b/libpod/stats_linux.go index aad9d70516..5eb0449383 100644 --- a/libpod/stats_linux.go +++ b/libpod/stats_linux.go @@ -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