Commit Graph

14 Commits

Author SHA1 Message Date
Kir Kolyshkin 421ee18e18 libpod: add a nolint:wastedassign annotation
TODO: figure this out :)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-04-02 13:35:14 -07:00
Kir Kolyshkin 7c175064da libpod: rm nolint annotation
It does not make sense because MemInfo.MemTotal is always int64 so the
conversion is always needed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00
fanqiaojun 1600cfffa5 Fix some comments
Signed-off-by: fanqiaojun <fanqiaojun@yeah.net>
2024-04-13 15:20:19 +08:00
Matt Heon 72f1617fac Bump Go module to v5
Moving from Go module v4 to v5 prepares us for public releases.

Move done using gomove [1] as with the v3 and v4 moves.

[1] https://github.com/KSubedi/gomove

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00
Matt Heon 6e0decbe03 Send container stats over API on a per-interface basis
This mirrors how the Docker API handles things, allowing us to be
more compatible with Docker and more verbose on the Libpod API.
Stats are given as per network interface in the container, but
still aggregated for `podman stats` and `podman pod stats`
display (so the CLI does not change, only the Libpod and Compat
APIs).

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-06 17:05:07 -05:00
Oleksandr Redko 2a2d0b0e18 chore: delete obsolete // +build lines
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2024-01-04 11:53:38 +02:00
Giuseppe Scrivano d2a37222b9
freebsd: drop dead code
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-11-02 14:55:33 +01:00
Paul Holzinger bad25da92e
libpod: add !remote tag
This should never be pulled into the remote client.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-24 12:11:34 +02:00
Doug Rabson bb57c1631c libpod: add 'pod top' support on FreeBSD
This shares code with 'container top' which runs ps on the host,
filtering for the containers that are part of the pod.
(*Container).jailName is modified to take into account the possiblity
that the container is in a pod - this also fixes stats reporting for
pods on FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-07-28 10:52:20 +01:00
Boaz Shuster 5c7d50f08c Fix: display online_cpus in compat REST API
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2023-05-31 07:41:30 +03:00
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
Doug Rabson 21081355a7 libpod: Factor out jail name construction from stats_freebsd.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-10-17 15:33:18 +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 b47ce9a6e0 libpod: Add support for 'podman stats' on FreeBSD
[NO NEW TESTS NEEDED]

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