1
2
3 package process
4
5 import (
6 "context"
7 "syscall"
8
9 "github.com/shirou/gopsutil/cpu"
10 "github.com/shirou/gopsutil/internal/common"
11 "github.com/shirou/gopsutil/net"
12 )
13
14 type MemoryMapsStat struct {
15 Path string `json:"path"`
16 Rss uint64 `json:"rss"`
17 Size uint64 `json:"size"`
18 Pss uint64 `json:"pss"`
19 SharedClean uint64 `json:"sharedClean"`
20 SharedDirty uint64 `json:"sharedDirty"`
21 PrivateClean uint64 `json:"privateClean"`
22 PrivateDirty uint64 `json:"privateDirty"`
23 Referenced uint64 `json:"referenced"`
24 Anonymous uint64 `json:"anonymous"`
25 Swap uint64 `json:"swap"`
26 }
27
28 type MemoryInfoExStat struct {
29 }
30
31 func pidsWithContext(ctx context.Context) ([]int32, error) {
32 return nil, common.ErrNotImplementedError
33 }
34
35 func ProcessesWithContext(ctx context.Context) ([]*Process, error) {
36 return nil, common.ErrNotImplementedError
37 }
38
39 func PidExistsWithContext(ctx context.Context, pid int32) (bool, error) {
40 return false, common.ErrNotImplementedError
41 }
42
43 func (p *Process) PpidWithContext(ctx context.Context) (int32, error) {
44 return 0, common.ErrNotImplementedError
45 }
46
47 func (p *Process) NameWithContext(ctx context.Context) (string, error) {
48 return "", common.ErrNotImplementedError
49 }
50
51 func (p *Process) TgidWithContext(ctx context.Context) (int32, error) {
52 return 0, common.ErrNotImplementedError
53 }
54
55 func (p *Process) ExeWithContext(ctx context.Context) (string, error) {
56 return "", common.ErrNotImplementedError
57 }
58
59 func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {
60 return "", common.ErrNotImplementedError
61 }
62
63 func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) {
64 return nil, common.ErrNotImplementedError
65 }
66
67 func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) {
68 return 0, common.ErrNotImplementedError
69 }
70
71 func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
72 return "", common.ErrNotImplementedError
73 }
74
75 func (p *Process) ParentWithContext(ctx context.Context) (*Process, error) {
76 return nil, common.ErrNotImplementedError
77 }
78
79 func (p *Process) StatusWithContext(ctx context.Context) (string, error) {
80 return "", common.ErrNotImplementedError
81 }
82
83 func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) {
84 return false, common.ErrNotImplementedError
85 }
86
87 func (p *Process) UidsWithContext(ctx context.Context) ([]int32, error) {
88 return nil, common.ErrNotImplementedError
89 }
90
91 func (p *Process) GidsWithContext(ctx context.Context) ([]int32, error) {
92 return nil, common.ErrNotImplementedError
93 }
94
95 func (p *Process) GroupsWithContext(ctx context.Context) ([]int32, error) {
96 return nil, common.ErrNotImplementedError
97 }
98
99 func (p *Process) TerminalWithContext(ctx context.Context) (string, error) {
100 return "", common.ErrNotImplementedError
101 }
102
103 func (p *Process) NiceWithContext(ctx context.Context) (int32, error) {
104 return 0, common.ErrNotImplementedError
105 }
106
107 func (p *Process) IOniceWithContext(ctx context.Context) (int32, error) {
108 return 0, common.ErrNotImplementedError
109 }
110
111 func (p *Process) RlimitWithContext(ctx context.Context) ([]RlimitStat, error) {
112 return nil, common.ErrNotImplementedError
113 }
114
115 func (p *Process) RlimitUsageWithContext(ctx context.Context, gatherUsed bool) ([]RlimitStat, error) {
116 return nil, common.ErrNotImplementedError
117 }
118
119 func (p *Process) IOCountersWithContext(ctx context.Context) (*IOCountersStat, error) {
120 return nil, common.ErrNotImplementedError
121 }
122
123 func (p *Process) NumCtxSwitchesWithContext(ctx context.Context) (*NumCtxSwitchesStat, error) {
124 return nil, common.ErrNotImplementedError
125 }
126
127 func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) {
128 return 0, common.ErrNotImplementedError
129 }
130
131 func (p *Process) NumThreadsWithContext(ctx context.Context) (int32, error) {
132 return 0, common.ErrNotImplementedError
133 }
134
135 func (p *Process) ThreadsWithContext(ctx context.Context) (map[int32]*cpu.TimesStat, error) {
136 return nil, common.ErrNotImplementedError
137 }
138
139 func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) {
140 return nil, common.ErrNotImplementedError
141 }
142
143 func (p *Process) CPUAffinityWithContext(ctx context.Context) ([]int32, error) {
144 return nil, common.ErrNotImplementedError
145 }
146
147 func (p *Process) MemoryInfoWithContext(ctx context.Context) (*MemoryInfoStat, error) {
148 return nil, common.ErrNotImplementedError
149 }
150
151 func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExStat, error) {
152 return nil, common.ErrNotImplementedError
153 }
154
155 func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) {
156 return nil, common.ErrNotImplementedError
157 }
158
159 func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) {
160 return nil, common.ErrNotImplementedError
161 }
162
163 func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, error) {
164 return nil, common.ErrNotImplementedError
165 }
166
167 func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) {
168 return nil, common.ErrNotImplementedError
169 }
170
171 func (p *Process) ConnectionsMaxWithContext(ctx context.Context, max int) ([]net.ConnectionStat, error) {
172 return nil, common.ErrNotImplementedError
173 }
174
175 func (p *Process) NetIOCountersWithContext(ctx context.Context, pernic bool) ([]net.IOCountersStat, error) {
176 return nil, common.ErrNotImplementedError
177 }
178
179 func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]MemoryMapsStat, error) {
180 return nil, common.ErrNotImplementedError
181 }
182
183 func (p *Process) SendSignalWithContext(ctx context.Context, sig syscall.Signal) error {
184 return common.ErrNotImplementedError
185 }
186
187 func (p *Process) SuspendWithContext(ctx context.Context) error {
188 return common.ErrNotImplementedError
189 }
190
191 func (p *Process) ResumeWithContext(ctx context.Context) error {
192 return common.ErrNotImplementedError
193 }
194
195 func (p *Process) TerminateWithContext(ctx context.Context) error {
196 return common.ErrNotImplementedError
197 }
198
199 func (p *Process) KillWithContext(ctx context.Context) error {
200 return common.ErrNotImplementedError
201 }
202
203 func (p *Process) UsernameWithContext(ctx context.Context) (string, error) {
204 return "", common.ErrNotImplementedError
205 }
206
207 func (p *Process) EnvironWithContext(ctx context.Context) ([]string, error) {
208 return nil, common.ErrNotImplementedError
209 }
210
View as plain text