-
Notifications
You must be signed in to change notification settings - Fork 0
/
qtopconf.yaml
309 lines (283 loc) · 11.3 KB
/
qtopconf.yaml
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
## Default configuration file for qtop.
## DO NOT OVERWRITE this file with your own settings. Instead,
## create a new qtopconf.yaml in ~/.local/qtop/ (you can copy this one if you want)
## IMPORTANT: a blank line MUST be left after every line of *python code*.
## Lines beginning with double hash are comments
## Lines beginning with single hash are commands commented out that you could try out.
## Available colors and fg-bg combinations depicted in colormap.py, in color_to_code
## scheduler possible values (currently supported): pbs, oar, sge
## auto will try to detect available batch commands in the current system
scheduler: auto
## where to save output from batch commands and their intermediate conversion to json format
## users can select e.g. /dev/shm (ram disk) instead of /tmp for faster processing, or even $TMP or $TMPDIR
savepath: /tmp/qtop_results_$USER
## batch commands, filenames to save their output in
## If user sets a sourcedir, qtop expects to find the respective
## filenames below, minus the _pid.
schedulers:
pbs:
pbsnodes_file: %(savepath)s/pbsnodes_a%(pid)s.txt, pbsnodes -a
qstatq_file: %(savepath)s/qstat_q%(pid)s.txt, qstat -q
qstat_file: %(savepath)s/qstat%(pid)s.txt, qstat
oar:
oarnodes_s_file: %(savepath)s/oarnodes_s_Y%(pid)s.txt, oarnodes -s -Y
oarnodes_y_file: %(savepath)s/oarnodes_Y%(pid)s.txt, oarnodes -Y
oarstat_file: %(savepath)s/oarstat%(pid)s.txt, oarstat
sge:
sge_file: %(savepath)s/qstat%(pid)s.F.xml.stdout, qstat -F -xml -u '*'
demo:
demo_file: %(savepath)s/demo%(pid)s.txt, echo 'Demo here'
## commands used to uniquely identify the scheduler installed
signature_commands:
pbs: pbsnodes
oar: oarnodes
sge: qacct
demo: echo
## Utilises lxml module. Needs to be installed in your system.
## Might result in segmentation fault in some systems.
faster_xml_parsing: False
## Meaning of queue state abbreviations
state_abbreviations:
pbs:
Q: queued_of_user
R: running_of_user
C: cancelled_of_user
E: exiting_of_user
W: waiting_of_user
H: held_of_user
B: begun_of_user
F: finished_of_user
M: moved_of_user
S: suspended_of_user
T: transiting_of_user
U: suspended_useractive_of_user
X: expired_of_user
oar:
E: Error
F: Finishing
S: Resuming
H: Hold
L: waiting_of_user
W: queued_of_user
R: running_of_user
T: exiting_of_user
S: cancelled_of_user
sge:
## ref: http://www.softpanorama.org/HPC/Grid_engine/Reference/qstat.shtml
r: running_of_user
E: exiting_of_user # not real
qw: queued_of_user
C: cancelled_of_user # not real
W: waiting_of_user # not real
R: restarting_of_user
hr: hr_of_user
hRq: hRq_of_user
Eqw: Eqw_of_user
hqw: hold_of_user
hRq: hRq_of_user
t: transferring_of_user
T: threshold_reached
ht: ht_of_user
dr: job_ending_of_user
dt: dt_of_user
dht: dht_of_user
s: suspended_of_user
S: suspended_by_the_queue
shite: testing_of_user
ERq: ERq_of_user
Rq: queued_of_user
Rs: suspended_of_user
Rq: queued_of_user
Rt: transferring_of_user
Rr: running_of_user
demo:
Q: queued_of_user
R: running_of_user
C: cancelled_of_user
E: exiting_of_user
W: waiting_of_user
## original OAR abbreviations:
## state_abbreviations = {
## 'W': 'Waiting',
## 'L': 'toLaunch',
## 'L': 'Launching',
## 'H': 'Hold',
## 'R': 'Running',
## 'T': 'Terminated',
## 'E': 'Error',
## 'E': 'toError',
## 'F': 'Finishing',
## 'S': 'Suspended',
## 'S': 'Resuming',
## 'W': 'toAckReservation',
## }
percentage: 0.8 # if less than PERCENTAGE x 100% of the matrices have jobs, perform a blind remap
possible_ids: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz # IDs of unix accounts, for the lower part of qtop
non_existent_node_symbol: #
## Option to remove unneeded corelines taking up precious screen space.
## 0 removes nothing, 1 removes corelines consisting entirely of '#'s,
## 2 removes corelines consisting of '#'s and '_'s.
rem_empty_corelines: 0
## Term size is autodetected. If that fails, a value is read from here.
## If commented out, will get a fallback_terms_size from within constants.py
# term_size: [53, 176]
# term_size: [53, 126] # for smaller screens, namely 1366 x 768
user_color_mappings: # order should be from more generic-->more specific
# - \w+: Gray_D # enabling this cancels all saved accounts in colormap.py
# - [\d]+: Gray_D
# - [A-Za-z]+0\d{2}: Red_L
# - [A-Za-z]+15\d: Gray_D
# - \w*lhc\w*: Cyan_L
# - \w+00\d: Blue
# - \w*cms\w*: Red_L
- \w*cms048: Blue
- \w*cms193: Gray_L
- \w*atl\w+: Red
queue_color_mappings:
- alice: Red_L
- dteam\w+: Cyan_L
nodestate_color_mappings:
- au: BlackOnRed
- d: Red_LOnGrayBG
## if cluster numbering should start on a number # above this, do automatic blind remapping
exotic_starting_wn_nr: 9000
remapping:
# - "([A-Za-z]+)([1-9]|[1-9][0-9]|[0-9][0-9][0-9])$": |
# lambda m: m.group(1)+str(int(m.group(2))+250)
## e.g. wn100 --> wn350, wn101 --> wn351 and so on
# - torvalds(\d+): tor\1
# - gridlab(\d+): glab\1
# - gridmon(\d*): mon\1
# - ^da-(.*?): ca\1
# - (.*?)cluster(.*?): \1-\2 # remove "cluster" word from all node names
## WARNING: not working properly in native yaml parser
# - -: "" # removes dashes for shortening (can also replace them with something else, e.g. _
## re-arranging lines will sort nodes with the respective sorting priority (first line has top priority)
sorting:
user_sort:
- sort by nodename-notnum
- sort by all numbers
# - sort by core occupancy
# - sort by first letter
# - sort by node state
# - sort by nr of cores
# - sort by custom definition
reverse: False
# sorting:
# user_sort: |
# lambda node: (
# len(node['domainname'].split('.', 1)[0].split('-')[0]), # sort by name length, until first dash or dot
# int(re.sub(r"[A-Za-z _.-]+", "", node["domainname"]) or "0"), # sort strictly by all numbers in name (joined)
# # int(re.sub(r'[A-Za-z_.-]+', '', node['domainname'].split('.', 1)[0].split('-')[0]) or -1), # sort by number adjacent to first word
# # ord(node['domainname'][0]), # sort by first letter
# # ord(str(node['state'][0])), # sort by node state
# # int(node['np']) # sort by number of cores
# # 0, # no sorting, MUST comment out other sorting options
# )
# reverse: False
## exclude filters gradually cut off selected nodes from the last set of remaining nodes
## include filters do a consecutive selection, e.g. from 100 nodes 30 are selected, then the next include filter will select 10 out of those and so on.
## or_include filters select the union of the selections.
## Filters can only be combined if they are the same kind, i.e. exclude with exclude, or_include with or_include
## IMPORTANT: single-item lists need to end in a comma! e.g. ['^gaia-',]
filtering:
# - exclude_node_states: ['hqw','au']
# - exclude_numbers: [3,4]
# - exclude_name_patterns: ['^da-p6','^da-p7']
# - include_name_patterns: ['^da-p6',]
# - include_node_states: ['hqw','au']
# - include_numbers: [3,4]
# - or_include_numbers: [3,4]
# - or_include_node_states: ['hqw','au']
# - or_include_name_patterns: ['^da-p6','^da-p7','^da-p8']
# - or_include_name_patterns:
# - ^da-p[67]
# - ^da-p8
# - ranges_out: 1-12, 30-42 # TODO, not working
## Highlight selected usernames (regex expression), userIDs, and/or Queues
highlight:
#- or_include_user_pat: ['biomed017']
#- or_include_queue: ['whole', 'grid500M']
#- or_include_user_id: ['0', '1']
#- include_queue: ['whole']
#- include_user_pat: ['biomed\d+']
## what parts of qtop to display
user_display_parts:
- job_accounting_summary
- workernodes_matrix
- user_accounts_pool_mappings
#wn_occupancy:
# - wn id lines
# - node state
# - temperature # not working. For illustrative purposes
# - core_user_map
## character used for vertical separator in WN occupancy matrix
vertical_separator: '|'
## Put vertical_separator every X columns.
vertical_separator_every_X_columns: 0
## Put vertical_separator in case of overspill (SGE systems only).
separator_after_overspill: True
## TODO (not implemented)
overspill_separator: '*'
workernodes_matrix:
- wn id lines:
max_len: 22
## Masking/clipping functionality. How high should the # earliest node number be (e.g. 50), to make the previous WNs vanish
min_masking_threshold: 9
## Change this to an int if you want a custom cut matrix length
user_cut_matrix_width: 0
## customised end labels
end_labels:
1: ['={__WNID__}',]
2: ['={_Worker_}', '={__Node__}']
3: ['={_Worker_}', '={__Node__}', '={___ID___}']
4: ['={________}', '={_Worker_}', '={__Node__}', '={___ID___}']
5: ['={________}', '={________}', '={_Worker_}', '={__Node__}', '={___ID___}']
6: ['={________}', '={________}', '={________}', '={_Worker_}', '={__Node__}', '={___ID___}']
7: ['={________}', '={________}', '={________}', '={________}', '={_Worker_}', '={__Node__}', '={___ID___}']
## native yaml parser BUG/TODO: two consecutive unindents are not allowed. Must have an unindented key-value after nested keys:
alt_label_colors: [White, Blue_L]
# - temperature: # not working, for illustrative purposes
# yaml key: temperature # how it's found in the yaml file
# label: Temperature (C) # how to label it on the qtop matrix
# option: {}
# max_len: 1
- node state:
yaml_key: state
label: Node state
max_len: 5
systems: [sge, oar, pbs, demo]
- queue name:
yaml_key: qname
label: queue name
max_len: 13
systems: [sge, oar, pbs, demo]
- core_user_map:
options1: {}
options2: {}
extract_info:
user_details_cache: cat -E $HOME/.local/qtop/getent_passwd.txt # this gets cached GECOS field info
user_details_realtime: getent passwd %s # alternative method to get details in realtime
field_to_use: 5
regex: |
re.search('(?<=<)[^<>]+(?=>)', field).group(0)
## If set to true, wn_occupancy matrices contain the first letter of the user
## owning the job. If false, it will show a mapped single-letter id instead.
## The latter is useful when there are a lot of users starting with the same letter.
fill_with_user_firstletter: False
## If set to true, lines represent worker nodes, wherease if set to false, columns do.
## Default is True
transpose_wn_matrices: True
occupancy_column_order:
- wnid_lines
- core_map
- Node state
- queue name
horizontal_separator: '|'
auto_delete_old_output_files_after: 24h # (m)inutes, (s)econds also supported
replay_last: 2m # when --replay is invoked, this is the time qtop will automatically replay from if no datetime/duration is given
overwrite_sample_file: True # True (default) writes to tar using the same constant filename, False appends a timestamp
## core_coloring can be either:
## - user_to_color, which paints core jobs according to the userid color, or
## - queue_to_color, which paints core jobs according to queue color
core_coloring: user_to_color