-
Notifications
You must be signed in to change notification settings - Fork 0
/
v_marathon_docker_apps.lua
216 lines (210 loc) · 5.93 KB
/
v_marathon_docker_apps.lua
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
--[[
Copyright (C) 2013-2014 Draios inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
--]]
view_info =
{
id = "marathon_docker_apps",
name = "Marathon/Docker Apps",
description = "List all Marathon apps running on this machine, and the resources that each of them uses.",
tips = {"Select an app and click enter to drill down into it. At that point, you will be able to access several views that will show you the details of the selected app."},
view_type = "table",
applies_to = {"", "evt.res", "marathon.group.id"},
filter = "marathon.app.id != ''",
use_defaults = true,
drilldown_target = "mesos_tasks",
columns =
{
{
name = "NA",
field = "thread.tid",
is_key = true
},
{
name = "CPU",
field = "thread.cpu",
description = "Amount of CPU used by the app.",
colsize = 8,
aggregation = "AVG",
groupby_aggregation = "SUM",
is_sorting = true
},
{
name = "PID",
field = "proc.pid",
colsize = 8,
},
{
name = "CID",
field = "container.id",
description = "Container ID. The format of this column depends on the containerization technology. For example, Docker ID are 12 characters hexadecimal digit strings.",
colsize = 13
},
{
name = "NA",
field = "marathon.app.id",
is_groupby_key = true
},
{
name = "APP",
field = "marathon.app.id",
description = "App name.",
colsize = 20
},
{
name = "VIRT",
field = "thread.vmsize.b",
description = "Total virtual memory for the app.",
aggregation = "MAX",
groupby_aggregation = "SUM",
colsize = 9
},
{
name = "RES",
field = "thread.vmrss.b",
description = "Resident non-swapped memory for the app.",
aggregation = "MAX",
groupby_aggregation = "SUM",
colsize = 9
},
{
name = "PROCS",
field = "evt.count.procinfo",
description = "Number of processes currently running inside the container.",
aggregation = "AVG",
groupby_aggregation = "SUM",
colsize = 8,
},
{
name = "THREADS",
field = "evt.count.threadinfo",
description = "Number of threads currently running inside the container.",
aggregation = "AVG",
groupby_aggregation = "SUM",
colsize = 8
},
{
name = "FILE",
field = "evt.buflen.file",
description = "Total (input+output) file I/O bandwidth generated by the app, in bytes per second.",
colsize = 8,
aggregation = "TIME_AVG",
groupby_aggregation = "SUM"
},
{
name = "NET",
field = "evt.buflen.net",
description = "Total (input+output) network bandwidth generated by the app, in bytes per second.",
colsize = 8,
aggregation = "TIME_AVG",
groupby_aggregation = "SUM"
},
{
name = "EFILE",
field = "evt.count.error.file",
description = "Number of file I/O errors generated in the container during the sample interval. On trace files, this is the total for the whole file.",
colsize = 8,
aggregation = "SUM",
groupby_aggregation = "SUM"
},
{
name = "ENET",
field = "evt.count.error.net",
description = "Number of network I/O errors generated in the container during the sample interval. On trace files, this is the total for the whole file.",
colsize = 8,
aggregation = "SUM",
groupby_aggregation = "SUM"
},
{
name = "EMEMORY",
field = "evt.count.error.memory",
description = "Number of memory allocation/release related errors generated in the container during the sample interval. On trace files, this is the total for the whole file.",
colsize = 8,
aggregation = "SUM",
groupby_aggregation = "SUM"
},
{
name = "EOTHER",
field = "evt.count.error.other",
description = "Number of errors generated in the container that don't fall in any of the previous categories. E.g. signal or event related errors. On trace files, this is the total for the whole file.",
colsize = 8,
aggregation = "SUM",
groupby_aggregation = "SUM"
},
{
name = "PMAJOR",
field = "thread.pfmajor",
description = "Number of major page faults that the process generated since its start.",
colsize = 9,
aggregation = "MAX",
},
{
name = "PMINOR",
field = "thread.pfminor",
description = "Number of minor page faults that the process generated since its start.",
colsize = 9,
aggregation = "MAX"
},
{
name = "FDOPEN",
field = "proc.fdopencount",
description = "Number of open FDs that the process currently has. On a trace file, this is the maximum value reached by the process over the whole file.",
aggregation = "MAX",
colsize = 8,
},
{
name = "FDMAX",
field = "proc.fdlimit",
description = "Maximum number of FDs that this process can open.",
aggregation = "MAX",
colsize = 8,
},
},
actions = {
{
hotkey = "b",
command = "docker exec -i -t %container.id /bin/bash",
description = "bash shell",
wait_finish = false
},
{
hotkey = "i",
command = "docker inspect %container.id",
description = "docker inspect"
},
{
hotkey = "k",
command = "docker kill %container.id",
description = "docker kill",
ask_confirmation = true
},
{
hotkey = "l",
command = "docker logs %container.id",
description = "docker logs"
},
{
hotkey = "s",
command = "strace -F -p %proc.pid",
description = "strace",
},
{
hotkey = "S",
command = "gdb -p %proc.pid --batch --quiet -ex \"thread apply all bt full\" -ex \"quit\"",
description = "print stack",
},
{
hotkey = "c",
command = "gcore %proc.pid",
description = "generate core",
},
},
}