mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-02 13:48:00 +00:00
Merge pull request #4668 from containers/dependabot/go_modules/github.com/containers/psgo-1.4.0
build(deps): bump github.com/containers/psgo from 1.3.2 to 1.4.0
This commit is contained in:
commit
668d77a12c
8 changed files with 43 additions and 56 deletions
|
|
@ -23,53 +23,11 @@ The latest option is not supported on the remote client.
|
|||
|
||||
## FORMAT DESCRIPTORS
|
||||
|
||||
The following descriptors are supported in addition to the AIX format descriptors mentioned in ps (1):
|
||||
|
||||
**args**, **capbnd**, **capeff**, **capinh**, **capprm**, **comm**, **etime**, **group**, **hgroup**, **hpid**, **huser**, **label**, **nice**, **pcpu**, **pgid**, **pid**, **ppid**, **rgroup**, **ruser**, **seccomp**, **state**, **time**, **tty**, **user**, **vsz**
|
||||
|
||||
**capbnd**
|
||||
|
||||
Set of bounding capabilities. See capabilities (7) for more information.
|
||||
|
||||
**capeff**
|
||||
|
||||
Set of effective capabilities. See capabilities (7) for more information.
|
||||
|
||||
**capinh**
|
||||
|
||||
Set of inheritable capabilities. See capabilities (7) for more information.
|
||||
|
||||
**capprm**
|
||||
|
||||
Set of permitted capabilities. See capabilities (7) for more information.
|
||||
|
||||
**hgroup**
|
||||
|
||||
The corresponding effective group of a container process on the host.
|
||||
|
||||
**hpid**
|
||||
|
||||
The corresponding host PID of a container process.
|
||||
|
||||
**huser**
|
||||
|
||||
The corresponding effective user of a container process on the host.
|
||||
|
||||
**label**
|
||||
|
||||
Current security attributes of the process.
|
||||
|
||||
**seccomp**
|
||||
|
||||
Seccomp mode of the process (i.e., disabled, strict or filter). See seccomp (2) for more information.
|
||||
|
||||
**state**
|
||||
|
||||
Process state codes (e.g, **R** for *running*, **S** for *sleeping*). See proc(5) for more information.
|
||||
Please refer to podman-top(1) for a full list of available descriptors.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
By default, `podman-top` prints data similar to `ps -ef`:
|
||||
By default, `podman-pod-top` prints data similar to `ps -ef`:
|
||||
|
||||
```
|
||||
$ podman pod top b031293491cc
|
||||
|
|
@ -88,7 +46,7 @@ PID SECCOMP COMMAND %CPU
|
|||
```
|
||||
|
||||
## SEE ALSO
|
||||
podman-pod(1), ps(1), seccomp(2), proc(5), capabilities(7)
|
||||
podman-pod(1), podman-top(1), ps(1), seccomp(2), proc(5), capabilities(7)
|
||||
|
||||
## HISTORY
|
||||
August 2018, Originally compiled by Peter Hunt <pehunt@redhat.com>
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@ The following descriptors are supported in addition to the AIX format descriptor
|
|||
|
||||
Process state codes (e.g, **R** for *running*, **S** for *sleeping*). See proc(5) for more information.
|
||||
|
||||
**stime**
|
||||
|
||||
Process start time (e.g, "2019-12-09 10:50:36 +0100 CET).
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
By default, `podman-top` prints data similar to `ps -ef`:
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -13,7 +13,7 @@ require (
|
|||
github.com/containers/buildah v1.11.6
|
||||
github.com/containers/conmon v2.0.2+incompatible // indirect
|
||||
github.com/containers/image/v5 v5.0.0
|
||||
github.com/containers/psgo v1.3.2
|
||||
github.com/containers/psgo v1.4.0
|
||||
github.com/containers/storage v1.15.3
|
||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
|
||||
|
|
|
|||
2
go.sum
2
go.sum
|
|
@ -88,6 +88,8 @@ github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b h1:Q8ePgVfHDpl
|
|||
github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
|
||||
github.com/containers/psgo v1.3.2 h1:jYfppPih3S/j2Yi5O14AXjd8GfCx1ph9L3YsoK3adko=
|
||||
github.com/containers/psgo v1.3.2/go.mod h1:ENXXLQ5E1At4K0EUsGogXBJi/C28gwqkONWeLPI9fJ8=
|
||||
github.com/containers/psgo v1.4.0 h1:D8B4fZCCZhYgc8hDyMPCiShOinmOB1TP1qe46sSC19k=
|
||||
github.com/containers/psgo v1.4.0/go.mod h1:ENXXLQ5E1At4K0EUsGogXBJi/C28gwqkONWeLPI9fJ8=
|
||||
github.com/containers/storage v1.13.4 h1:j0bBaJDKbUHtAW1MXPFnwXJtqcH+foWeuXK1YaBV5GA=
|
||||
github.com/containers/storage v1.13.4/go.mod h1:6D8nK2sU9V7nEmAraINRs88ZEscM5C5DK+8Npp27GeA=
|
||||
github.com/containers/storage v1.13.5 h1:/SUzGeOP2HDijpF7Yur21Ch6WTZC1BNeZF917CWcp5c=
|
||||
|
|
|
|||
2
vendor/github.com/containers/psgo/README.md
generated
vendored
2
vendor/github.com/containers/psgo/README.md
generated
vendored
|
|
@ -85,6 +85,8 @@ The ps library is compatible with all AIX format descriptors of the ps command-l
|
|||
- Seccomp mode of the process (i.e., disabled, strict or filter). See seccomp(2) for more information.
|
||||
- **state**
|
||||
- Process state codes (e.g, **R** for *running*, **S** for *sleeping*). See proc(5) for more information.
|
||||
- **stime**
|
||||
- Process start time (e.g, "2019-12-09 10:50:36 +0100 CET).
|
||||
|
||||
We can try out different format descriptors with the psgo binary:
|
||||
|
||||
|
|
|
|||
25
vendor/github.com/containers/psgo/internal/process/process.go
generated
vendored
25
vendor/github.com/containers/psgo/internal/process/process.go
generated
vendored
|
|
@ -188,23 +188,30 @@ func (p *Process) SetHostData() error {
|
|||
|
||||
// ElapsedTime returns the time.Duration since process p was created.
|
||||
func (p *Process) ElapsedTime() (time.Duration, error) {
|
||||
sinceBoot, err := strconv.ParseInt(p.Stat.Starttime, 10, 64)
|
||||
startTime, err := p.StartTime()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return (time.Now()).Sub(startTime), nil
|
||||
}
|
||||
|
||||
// StarTime returns the time.Time when process p was started.
|
||||
func (p *Process) StartTime() (time.Time, error) {
|
||||
sinceBoot, err := strconv.ParseInt(p.Stat.Starttime, 10, 64)
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
clockTicks, err := host.ClockTicks()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
return time.Time{}, err
|
||||
}
|
||||
bootTime, err := host.BootTime()
|
||||
if err != nil {
|
||||
return time.Time{}, err
|
||||
}
|
||||
|
||||
sinceBoot = sinceBoot / clockTicks
|
||||
|
||||
bootTime, err := host.BootTime()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
created := time.Unix(sinceBoot+bootTime, 0)
|
||||
return (time.Now()).Sub(created), nil
|
||||
return time.Unix(sinceBoot+bootTime, 0), nil
|
||||
}
|
||||
|
||||
// CPUTime returns the cumlative CPU time of process p as a time.Duration.
|
||||
|
|
|
|||
14
vendor/github.com/containers/psgo/psgo.go
generated
vendored
14
vendor/github.com/containers/psgo/psgo.go
generated
vendored
|
|
@ -310,6 +310,11 @@ var (
|
|||
header: "STATE",
|
||||
procFn: processState,
|
||||
},
|
||||
{
|
||||
normal: "stime",
|
||||
header: "STIME",
|
||||
procFn: processStartTime,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -715,6 +720,15 @@ func processTIME(p *process.Process, ctx *psContext) (string, error) {
|
|||
return fmt.Sprintf("%v", cpu), nil
|
||||
}
|
||||
|
||||
// processStartTime returns the start time of process p.
|
||||
func processStartTime(p *process.Process, ctx *psContext) (string, error) {
|
||||
sTime, err := p.StartTime()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return fmt.Sprintf("%v", sTime), nil
|
||||
}
|
||||
|
||||
// processTTY returns the controlling tty (terminal) of process p.
|
||||
func processTTY(p *process.Process, ctx *psContext) (string, error) {
|
||||
ttyNr, err := strconv.ParseUint(p.Stat.TtyNr, 10, 64)
|
||||
|
|
|
|||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
|
@ -117,7 +117,7 @@ github.com/containers/image/v5/types
|
|||
github.com/containers/image/v5/version
|
||||
# github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b
|
||||
github.com/containers/libtrust
|
||||
# github.com/containers/psgo v1.3.2
|
||||
# github.com/containers/psgo v1.4.0
|
||||
github.com/containers/psgo
|
||||
github.com/containers/psgo/internal/capabilities
|
||||
github.com/containers/psgo/internal/cgroups
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue