Bump github.com/containers/psgo from 1.4.0 to 1.5.0

Bumps [github.com/containers/psgo](https://github.com/containers/psgo) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/containers/psgo/releases)
- [Commits](https://github.com/containers/psgo/compare/v1.4.0...v1.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
dependabot-preview[bot]
2020-04-17 09:00:46 +00:00
committed by Daniel J Walsh
parent 0d2b5532c4
commit d6d8106601
10 changed files with 47 additions and 27 deletions

View File

@ -305,6 +305,11 @@ var (
onHost: true,
procFn: processHGROUP,
},
{
normal: "rss",
header: "RSS",
procFn: processRSS,
},
{
normal: "state",
header: "STATE",
@ -663,12 +668,7 @@ func processARGS(p *process.Process, ctx *psContext) (string, error) {
// processCOMM returns the command name (i.e., executable name) of process p.
func processCOMM(p *process.Process, ctx *psContext) (string, error) {
// ps (1) returns "[$name]" if command/args are empty
if p.CmdLine[0] == "" {
return processName(p, ctx)
}
spl := strings.Split(p.CmdLine[0], "/")
return spl[len(spl)-1], nil
return p.Stat.Comm, nil
}
// processNICE returns the nice value of process p.
@ -867,6 +867,16 @@ func processHGROUP(p *process.Process, ctx *psContext) (string, error) {
return "?", nil
}
// processRSS returns the resident set size of process p in KiB (1024-byte
// units).
func processRSS(p *process.Process, ctx *psContext) (string, error) {
if p.Status.VMRSS == "" {
// probably a kernel thread
return "0", nil
}
return p.Status.VMRSS, nil
}
// processState returns the process state of process p.
func processState(p *process.Process, ctx *psContext) (string, error) {
return p.Status.State, nil