Commit Graph

4 Commits

Author SHA1 Message Date
Ingo Becker 75f6a1d596 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>
2022-11-28 12:26:41 +01:00
Alexander Larsson 55191ecc20 Add and use Container.LinuxResource() helper
This gets c.config.Spec.Linux.Resources, with some nil checks.
Using this means less open coding of the nil-checks, but also the
existing user of this field in moveConmonToCgroupAndSignal() was
using ctr.Spec().Linux.Resources instead, and the Spec() call
is very expensive.

[NO NEW TESTS NEEDED] Just minor performance effects

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-10-12 13:45:49 +02:00
Doug Rabson b3e978e43b libpod: Split out the common code from GetContainerStats
This moves the cgroups code to a new method getPlatformContainerStats.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-14 08:29:26 +01:00
Doug Rabson 47bd9e8110 libpod: Move stats.go to stats_linux.go for consistency
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-14 08:29:26 +01:00