fix print config

This commit is contained in:
Alexey Avramov 2018-12-12 16:02:21 +09:00
parent 8d5de95698
commit 68e28f9ddf
2 changed files with 14 additions and 16 deletions

24
nohang
View File

@ -1315,37 +1315,35 @@ if print_config:
print('min_badness: {}'.format(min_badness)) print('min_badness: {}'.format(min_badness))
# False (OK) - OK не нужен когда фолс # False (OK) - OK не нужен когда фолс
print('decrease_oom_score_adj: {} ({})'.format( print('decrease_oom_score_adj: {}'.format(
decrease_oom_score_adj, decrease_res decrease_oom_score_adj
)) ))
if decrease_oom_score_adj: if decrease_oom_score_adj:
print('oom_score_adj_max: {}'.format(oom_score_adj_max)) print('oom_score_adj_max: {}'.format(oom_score_adj_max))
print('\n4. Impact on the badness of processes via matching their names\nwith regular expressions\n') print('\n4. Impact on the badness of processes via matching their' \
' names, cmdlines ir UIDs with regular expressions\n')
print('regex_matching: {}'.format(regex_matching)) print('regex_matching: {}'.format(regex_matching))
if regex_matching: if regex_matching:
print()
print('prefer_regex: {}'.format(prefer_regex)) print('prefer_regex: {}'.format(prefer_regex))
print('prefer_factor: {}'.format(prefer_factor)) print('prefer_factor: {}'.format(prefer_factor))
print()
print('avoid_regex: {}'.format(avoid_regex)) print('avoid_regex: {}'.format(avoid_regex))
print('avoid_factor: {}'.format(avoid_factor)) print('avoid_factor: {}'.format(avoid_factor))
print() print()
print('re_match_cmdline: {}'.format(re_match_cmdline))
if re_match_cmdline:
print('prefer_re_cmdline: {}'.format(prefer_re_cmdline)) print('prefer_re_cmdline: {}'.format(prefer_re_cmdline))
print('prefer_cmd_factor: {}'.format(prefer_cmd_factor)) print('prefer_cmd_factor: {}'.format(prefer_cmd_factor))
print()
print('avoid_re_cmdline: {}'.format(avoid_re_cmdline)) print('avoid_re_cmdline: {}'.format(avoid_re_cmdline))
print('avoid_cmd_factor: {}'.format(avoid_cmd_factor)) print('avoid_cmd_factor: {}'.format(avoid_cmd_factor))
print() print()
print('re_match_uid: {}'.format(re_match_uid))
if re_match_uid:
print('prefer_re_uid: {}'.format(prefer_re_uid)) print('prefer_re_uid: {}'.format(prefer_re_uid))
print('prefer_uid_factor: {}'.format(prefer_uid_factor)) print('prefer_uid_factor: {}'.format(prefer_uid_factor))
print()
print('avoid_re_uid: {}'.format(avoid_re_uid)) print('avoid_re_uid: {}'.format(avoid_re_uid))
print('avoid_uid_factor: {}'.format(avoid_uid_factor)) print('avoid_uid_factor: {}'.format(avoid_uid_factor))

View File

@ -9,8 +9,8 @@
2. The frequency of checking the level of available memory 2. The frequency of checking the level of available memory
(and CPU usage) (and CPU usage)
3. The prevention of killing innocent victims 3. The prevention of killing innocent victims
4. Impact on the badness of processes via matching their names 4. Impact on the badness of processes via matching their names,
with regular expressions cmdlines and UIDs with regular expressions
5. The execution of a specific command instead of sending the 5. The execution of a specific command instead of sending the
SIGTERM signal SIGTERM signal
6. GUI notifications: 6. GUI notifications:
@ -176,7 +176,7 @@ re_match_cmdline = False
# this default pattern for prefer childs of firefox and chromium # this default pattern for prefer childs of firefox and chromium
prefer_re_cmdline = -childID|--type=renderer prefer_re_cmdline = -childID|--type=renderer
prefer_cmd_factor = 12 prefer_cmd_factor = 9
avoid_re_cmdline = ^/usr/lib/virtualbox avoid_re_cmdline = ^/usr/lib/virtualbox
avoid_cmd_factor = 3 avoid_cmd_factor = 3