fix
This commit is contained in:
parent
2b7436c52d
commit
7bc55b3950
29
nohang
29
nohang
@ -1023,14 +1023,9 @@ def find_victim(_print_proc_table):
|
|||||||
elif extra_table_info == 'cmdline':
|
elif extra_table_info == 'cmdline':
|
||||||
extra_table_title = 'cmdline'
|
extra_table_title = 'cmdline'
|
||||||
|
|
||||||
|
|
||||||
elif extra_table_info == 'environ':
|
elif extra_table_info == 'environ':
|
||||||
extra_table_title = 'environ'
|
extra_table_title = 'environ'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elif extra_table_info == 'realpath':
|
elif extra_table_info == 'realpath':
|
||||||
extra_table_title = 'realpath'
|
extra_table_title = 'realpath'
|
||||||
|
|
||||||
@ -1803,9 +1798,6 @@ try:
|
|||||||
exit(1)
|
exit(1)
|
||||||
etc_dict[etc_name] = etc_command
|
etc_dict[etc_name] = etc_command
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if line.startswith('@PROCESSNAME_RE'):
|
if line.startswith('@PROCESSNAME_RE'):
|
||||||
a = line.partition(
|
a = line.partition(
|
||||||
'@PROCESSNAME_RE')[2].strip(' \n').partition('///')
|
'@PROCESSNAME_RE')[2].strip(' \n').partition('///')
|
||||||
@ -1855,8 +1847,6 @@ try:
|
|||||||
environ_re_list.append((badness_adj, reg_exp))
|
environ_re_list.append((badness_adj, reg_exp))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
errprint('PermissionError', conf_err_mess)
|
errprint('PermissionError', conf_err_mess)
|
||||||
exit(1)
|
exit(1)
|
||||||
@ -1874,15 +1864,11 @@ except FileNotFoundError:
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
print(processname_re_list)
|
# print(processname_re_list)
|
||||||
print(cmdline_re_list)
|
# print(cmdline_re_list)
|
||||||
print(uid_re_list)
|
# print(uid_re_list)
|
||||||
print(environ_re_list)
|
# print(environ_re_list)
|
||||||
print(realpath_re_list)
|
# print(realpath_re_list)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
@ -1912,11 +1898,6 @@ re_match_realpath = conf_parse_bool('re_match_realpath')
|
|||||||
re_match_environ = conf_parse_bool('re_match_environ')
|
re_match_environ = conf_parse_bool('re_match_environ')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# if regex_matching or re_match_cmdline or re_match_uid or re_match_cgroup
|
# if regex_matching or re_match_cmdline or re_match_uid or re_match_cgroup
|
||||||
# or re_match_realpath:
|
# or re_match_realpath:
|
||||||
# from re import search
|
# from re import search
|
||||||
|
14
nohang.conf
14
nohang.conf
@ -47,12 +47,12 @@
|
|||||||
MemAvailable levels.
|
MemAvailable levels.
|
||||||
|
|
||||||
mem_min_sigterm = 10 %
|
mem_min_sigterm = 10 %
|
||||||
mem_min_sigkill = 2 %
|
mem_min_sigkill = 5 %
|
||||||
|
|
||||||
SwapFree levels.
|
SwapFree levels.
|
||||||
|
|
||||||
swap_min_sigterm = 10 %
|
swap_min_sigterm = 15 %
|
||||||
swap_min_sigkill = 2 %
|
swap_min_sigkill = 5 %
|
||||||
|
|
||||||
Specifying the total share of zram in memory, if exceeded the
|
Specifying the total share of zram in memory, if exceeded the
|
||||||
corresponding signals are sent. As the share of zram in memory
|
corresponding signals are sent. As the share of zram in memory
|
||||||
@ -235,7 +235,7 @@ re_match_realpath = False
|
|||||||
|
|
||||||
5.6 Matching environ with RE patterns
|
5.6 Matching environ with RE patterns
|
||||||
|
|
||||||
re_match_environ = True
|
re_match_environ = False
|
||||||
|
|
||||||
@ENVIRON_RE 100 /// USER=user
|
@ENVIRON_RE 100 /// USER=user
|
||||||
|
|
||||||
@ -300,12 +300,12 @@ $ETC apache2 /// systemctl restart apache2
|
|||||||
- OOM prevention results and
|
- OOM prevention results and
|
||||||
- low memory warnings
|
- low memory warnings
|
||||||
|
|
||||||
gui_notifications = True
|
gui_notifications = False
|
||||||
|
|
||||||
Enable GUI notifications about the low level of available memory.
|
Enable GUI notifications about the low level of available memory.
|
||||||
Valid values are True and False.
|
Valid values are True and False.
|
||||||
|
|
||||||
gui_low_memory_warnings = True
|
gui_low_memory_warnings = False
|
||||||
|
|
||||||
Execute the command instead of sending GUI notifications if the value is
|
Execute the command instead of sending GUI notifications if the value is
|
||||||
not empty line. For example:
|
not empty line. For example:
|
||||||
@ -362,7 +362,7 @@ print_proc_table = True
|
|||||||
realpath
|
realpath
|
||||||
All
|
All
|
||||||
|
|
||||||
extra_table_info = environ
|
extra_table_info = None
|
||||||
|
|
||||||
print_victim_info = True
|
print_victim_info = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user