mirror of
https://github.com/containers/podman.git
synced 2025-07-01 16:17:06 +08:00
libpod: Factor out jail name construction from stats_freebsd.go
[NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
@ -20,13 +20,9 @@ import (
|
||||
func (c *Container) getPlatformContainerStats(stats *define.ContainerStats, previousStats *define.ContainerStats) error {
|
||||
now := uint64(time.Now().UnixNano())
|
||||
|
||||
jailName := c.ID()
|
||||
if c.state.NetNS != nil {
|
||||
jailName = c.state.NetNS.Name + "." + jailName
|
||||
}
|
||||
entries, err := rctl.GetRacct("jail:" + jailName)
|
||||
entries, err := rctl.GetRacct("jail:" + c.jailName())
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to read accounting for %s: %w", jailName, err)
|
||||
return fmt.Errorf("unable to read accounting for %s: %w", c.jailName(), err)
|
||||
}
|
||||
|
||||
// If the current total usage is less than what was previously
|
||||
|
Reference in New Issue
Block a user