...
1
2
3 package process
4
5 import (
6 "bytes"
7 "context"
8 "encoding/binary"
9
10 "github.com/shirou/gopsutil/cpu"
11 "github.com/shirou/gopsutil/internal/common"
12 "github.com/shirou/gopsutil/net"
13 )
14
15 type MemoryInfoExStat struct{}
16
17 type MemoryMapsStat struct{}
18
19 func (p *Process) TgidWithContext(ctx context.Context) (int32, error) {
20 return 0, common.ErrNotImplementedError
21 }
22
23 func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
24 return "", common.ErrNotImplementedError
25 }
26
27 func (p *Process) IOniceWithContext(ctx context.Context) (int32, error) {
28 return 0, common.ErrNotImplementedError
29 }
30
31 func (p *Process) RlimitWithContext(ctx context.Context) ([]RlimitStat, error) {
32 return nil, common.ErrNotImplementedError
33 }
34
35 func (p *Process) RlimitUsageWithContext(ctx context.Context, gatherUsed bool) ([]RlimitStat, error) {
36 return nil, common.ErrNotImplementedError
37 }
38
39 func (p *Process) NumCtxSwitchesWithContext(ctx context.Context) (*NumCtxSwitchesStat, error) {
40 return nil, common.ErrNotImplementedError
41 }
42
43 func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) {
44 return 0, common.ErrNotImplementedError
45 }
46
47 func (p *Process) CPUAffinityWithContext(ctx context.Context) ([]int32, error) {
48 return nil, common.ErrNotImplementedError
49 }
50
51 func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExStat, error) {
52 return nil, common.ErrNotImplementedError
53 }
54
55 func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
56 return nil, common.ErrNotImplementedError
57 }
58
59 func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, error) {
60 return nil, common.ErrNotImplementedError
61 }
62
63 func (p *Process) NetIOCountersWithContext(ctx context.Context, pernic bool) ([]net.IOCountersStat, error) {
64 return nil, common.ErrNotImplementedError
65 }
66
67 func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]MemoryMapsStat, error) {
68 return nil, common.ErrNotImplementedError
69 }
70
71 func (p *Process) ThreadsWithContext(ctx context.Context) (map[int32]*cpu.TimesStat, error) {
72 return nil, common.ErrNotImplementedError
73 }
74
75 func (p *Process) EnvironWithContext(ctx context.Context) ([]string, error) {
76 return nil, common.ErrNotImplementedError
77 }
78
79 func parseKinfoProc(buf []byte) (KinfoProc, error) {
80 var k KinfoProc
81 br := bytes.NewReader(buf)
82 err := common.Read(br, binary.LittleEndian, &k)
83 return k, err
84 }
85
View as plain text