-
Notifications
You must be signed in to change notification settings - Fork 4
/
process_other.go
128 lines (125 loc) · 2.44 KB
/
process_other.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//go:build !linux
// +build !linux
package psutilsql
var processColumn = map[pColumnNum]pColumn{
PID: {
names: []string{"pid"},
types: []string{"int"},
getFunc: getPid,
},
NAME: {
names: []string{"name"},
types: []string{"text"},
getFunc: getName,
},
CPU: {
names: []string{"CPU"},
types: []string{"float"},
getFunc: cpuPercent,
},
MEM: {
names: []string{"MEM"},
types: []string{"float"},
getFunc: memPercent,
},
STATUS: {
names: []string{"STATUS"},
types: []string{"text"},
getFunc: status,
},
START: {
names: []string{"START"},
types: []string{"timestamp"},
getFunc: createTime,
},
USER: {
names: []string{"USER"},
types: []string{"text"},
getFunc: getUser,
},
CWD: {
names: []string{"Cwd"},
types: []string{"text"},
getFunc: cwd,
},
EXE: {
names: []string{"Exe"},
types: []string{"text"},
getFunc: exe,
},
TERMINAL: {
names: []string{"Terminal"},
types: []string{"text"},
getFunc: terminal,
},
IONICE: {
names: []string{"IONice"},
types: []string{"int"},
getFunc: ioNice,
},
NICE: {
names: []string{"Nice"},
types: []string{"int"},
getFunc: nice,
},
NUMFDS: {
names: []string{"NumFDs"},
types: []string{"int"},
getFunc: numFDs,
},
NUMTHREADS: {
names: []string{"NumThreads"},
types: []string{"int"},
getFunc: numThreads,
},
PPID: {
names: []string{"pPid"},
types: []string{"int"},
getFunc: ppid,
},
TGID: {
names: []string{"Tgid"},
types: []string{"int"},
getFunc: tgid,
},
UIDS: {
names: []string{"Uids"},
types: []string{"text"},
getFunc: uids,
},
GIDS: {
names: []string{"Gids"},
types: []string{"text"},
getFunc: gids,
},
MEMORYINFO: {
names: []string{"RSS", "VMS", "Data", "Stack", "locked", "Swap"},
types: []string{"int", "int", "int", "int", "int", "int"},
getFunc: memoryInfo,
},
IOCOUNTERS: {
names: []string{"ReadCount", "WriteCount", "ReadBytes", "WriteBytes"},
types: []string{"int", "int", "int", "int"},
getFunc: ioCounters,
},
FOREGROUND: {
names: []string{"Foreground"},
types: []string{"bool"},
getFunc: foreGround,
},
BACKGROUND: {
names: []string{"Background"},
types: []string{"bool"},
getFunc: backGround,
},
ISRUNNING: {
names: []string{"IsRunning"},
types: []string{"bool"},
getFunc: isRunning,
},
COMMAND: {
names: []string{"COMMAND"},
types: []string{"text"},
getFunc: cmdLine,
},
}