mirror of
https://github.com/google/gops.git
synced 2025-02-19 19:59:55 +02:00
build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.9 to 3.22.10
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.9 to 3.22.10. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](https://github.com/shirou/gopsutil/compare/v3.22.9...v3.22.10) --- updated-dependencies: - dependency-name: github.com/shirou/gopsutil/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
f8e83ad200
commit
ed01246b0a
2
go.mod
2
go.mod
@ -4,7 +4,7 @@ go 1.13
|
||||
|
||||
require (
|
||||
github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19
|
||||
github.com/shirou/gopsutil/v3 v3.22.9
|
||||
github.com/shirou/gopsutil/v3 v3.22.10
|
||||
github.com/spf13/cobra v1.6.1
|
||||
github.com/xlab/treeprint v1.1.0
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
|
||||
|
8
go.sum
8
go.sum
@ -18,18 +18,20 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
|
||||
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/shirou/gopsutil/v3 v3.22.9 h1:yibtJhIVEMcdw+tCTbOPiF1VcsuDeTE4utJ8Dm4c5eA=
|
||||
github.com/shirou/gopsutil/v3 v3.22.9/go.mod h1:bBYl1kjgEJpWpxeHmLI+dVHWtyAwfcmSBLDsp2TNT8A=
|
||||
github.com/shirou/gopsutil/v3 v3.22.10 h1:4KMHdfBRYXGF9skjDWiL4RA2N+E8dRdodU/bOZpPoVg=
|
||||
github.com/shirou/gopsutil/v3 v3.22.10/go.mod h1:QNza6r4YQoydyCfo6rH0blGfKahgibh4dQmV5xdFkQk=
|
||||
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
|
||||
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
|
||||
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
|
||||
github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o=
|
||||
|
30
vendor/github.com/shirou/gopsutil/v3/internal/common/warnings.go
generated
vendored
Normal file
30
vendor/github.com/shirou/gopsutil/v3/internal/common/warnings.go
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
package common
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Warnings struct {
|
||||
List []error
|
||||
Verbose bool
|
||||
}
|
||||
|
||||
func (w *Warnings) Add(err error) {
|
||||
w.List = append(w.List, err)
|
||||
}
|
||||
|
||||
func (w *Warnings) Reference() error {
|
||||
if len(w.List) > 0 {
|
||||
return w
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *Warnings) Error() string {
|
||||
if w.Verbose {
|
||||
str := ""
|
||||
for i, e := range w.List {
|
||||
str += fmt.Sprintf("\tError %d: %s\n", i, e.Error())
|
||||
}
|
||||
return str
|
||||
}
|
||||
return fmt.Sprintf("Number of warnings: %v", len(w.List))
|
||||
}
|
2
vendor/github.com/shirou/gopsutil/v3/net/net_unix.go
generated
vendored
2
vendor/github.com/shirou/gopsutil/v3/net/net_unix.go
generated
vendored
@ -20,7 +20,7 @@ func Connections(kind string) ([]ConnectionStat, error) {
|
||||
}
|
||||
|
||||
func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) {
|
||||
return ConnectionsPid(kind, 0)
|
||||
return ConnectionsPidWithContext(ctx, kind, 0)
|
||||
}
|
||||
|
||||
// Return a list of network connections opened returning at most `max`
|
||||
|
3
vendor/github.com/shirou/gopsutil/v3/process/process_darwin_cgo.go
generated
vendored
3
vendor/github.com/shirou/gopsutil/v3/process/process_darwin_cgo.go
generated
vendored
@ -175,6 +175,7 @@ func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {
|
||||
func (p *Process) NumThreadsWithContext(ctx context.Context) (int32, error) {
|
||||
const tiSize = C.sizeof_struct_proc_taskinfo
|
||||
ti := (*C.struct_proc_taskinfo)(C.malloc(tiSize))
|
||||
defer C.free(unsafe.Pointer(ti))
|
||||
|
||||
_, err := C.proc_pidinfo(C.int(p.Pid), C.PROC_PIDTASKINFO, 0, unsafe.Pointer(ti), tiSize)
|
||||
if err != nil {
|
||||
@ -187,6 +188,7 @@ func (p *Process) NumThreadsWithContext(ctx context.Context) (int32, error) {
|
||||
func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) {
|
||||
const tiSize = C.sizeof_struct_proc_taskinfo
|
||||
ti := (*C.struct_proc_taskinfo)(C.malloc(tiSize))
|
||||
defer C.free(unsafe.Pointer(ti))
|
||||
|
||||
_, err := C.proc_pidinfo(C.int(p.Pid), C.PROC_PIDTASKINFO, 0, unsafe.Pointer(ti), tiSize)
|
||||
if err != nil {
|
||||
@ -204,6 +206,7 @@ func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error)
|
||||
func (p *Process) MemoryInfoWithContext(ctx context.Context) (*MemoryInfoStat, error) {
|
||||
const tiSize = C.sizeof_struct_proc_taskinfo
|
||||
ti := (*C.struct_proc_taskinfo)(C.malloc(tiSize))
|
||||
defer C.free(unsafe.Pointer(ti))
|
||||
|
||||
_, err := C.proc_pidinfo(C.int(p.Pid), C.PROC_PIDTASKINFO, 0, unsafe.Pointer(ti), tiSize)
|
||||
if err != nil {
|
||||
|
28
vendor/github.com/shirou/gopsutil/v3/process/process_windows.go
generated
vendored
28
vendor/github.com/shirou/gopsutil/v3/process/process_windows.go
generated
vendored
@ -10,6 +10,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
"syscall"
|
||||
@ -319,18 +320,19 @@ func (p *Process) PpidWithContext(ctx context.Context) (int32, error) {
|
||||
}
|
||||
|
||||
func (p *Process) NameWithContext(ctx context.Context) (string, error) {
|
||||
ppid, _, name, err := getFromSnapProcess(p.Pid)
|
||||
if p.Pid == 0 {
|
||||
return "System Idle Process", nil
|
||||
}
|
||||
if p.Pid == 4 {
|
||||
return "System", nil
|
||||
}
|
||||
|
||||
exe, err := p.ExeWithContext(ctx)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("could not get Name: %s", err)
|
||||
}
|
||||
|
||||
// if no errors and not cached already, cache ppid
|
||||
p.parent = ppid
|
||||
if 0 == p.getPpid() {
|
||||
p.setPpid(ppid)
|
||||
}
|
||||
|
||||
return name, nil
|
||||
return filepath.Base(exe), nil
|
||||
}
|
||||
|
||||
func (p *Process) TgidWithContext(ctx context.Context) (int32, error) {
|
||||
@ -987,15 +989,9 @@ func is32BitProcess(h windows.Handle) bool {
|
||||
|
||||
var procIs32Bits bool
|
||||
switch processorArchitecture {
|
||||
case PROCESSOR_ARCHITECTURE_INTEL:
|
||||
fallthrough
|
||||
case PROCESSOR_ARCHITECTURE_ARM:
|
||||
case PROCESSOR_ARCHITECTURE_INTEL, PROCESSOR_ARCHITECTURE_ARM:
|
||||
procIs32Bits = true
|
||||
case PROCESSOR_ARCHITECTURE_ARM64:
|
||||
fallthrough
|
||||
case PROCESSOR_ARCHITECTURE_IA64:
|
||||
fallthrough
|
||||
case PROCESSOR_ARCHITECTURE_AMD64:
|
||||
case PROCESSOR_ARCHITECTURE_ARM64, PROCESSOR_ARCHITECTURE_IA64, PROCESSOR_ARCHITECTURE_AMD64:
|
||||
var wow64 uint
|
||||
|
||||
ret, _, _ := common.ProcNtQueryInformationProcess.Call(
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -10,7 +10,7 @@ github.com/keybase/go-ps/darwincgo
|
||||
github.com/lufia/plan9stats
|
||||
# github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c
|
||||
github.com/power-devops/perfstat
|
||||
# github.com/shirou/gopsutil/v3 v3.22.9
|
||||
# github.com/shirou/gopsutil/v3 v3.22.10
|
||||
github.com/shirou/gopsutil/v3/cpu
|
||||
github.com/shirou/gopsutil/v3/internal/common
|
||||
github.com/shirou/gopsutil/v3/mem
|
||||
|
Loading…
x
Reference in New Issue
Block a user