do not print victim cmdline by default
This commit is contained in:
parent
cc0b1151de
commit
9caed4c6b4
22
nohang
22
nohang
@ -1117,7 +1117,8 @@ def find_victim_info(pid, victim_badness, name):
|
|||||||
vm_swap = kib_to_mib(int(line.split('\t')[1][:-4]))
|
vm_swap = kib_to_mib(int(line.split('\t')[1][:-4]))
|
||||||
break
|
break
|
||||||
|
|
||||||
cmdline = pid_to_cmdline(pid) # make it optional!
|
if print_victim_cmdline:
|
||||||
|
cmdline = pid_to_cmdline(pid)
|
||||||
oom_score = rline1('/proc/' + pid + '/oom_score')
|
oom_score = rline1('/proc/' + pid + '/oom_score')
|
||||||
oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj')
|
oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj')
|
||||||
|
|
||||||
@ -1172,7 +1173,8 @@ def find_victim_info(pid, victim_badness, name):
|
|||||||
vm_swap = kib_to_mib(
|
vm_swap = kib_to_mib(
|
||||||
int(f_list[i].split('\t')[1][:-3]))
|
int(f_list[i].split('\t')[1][:-3]))
|
||||||
|
|
||||||
cmdline = pid_to_cmdline(pid) # make it optional!
|
if print_victim_cmdline:
|
||||||
|
cmdline = pid_to_cmdline(pid)
|
||||||
oom_score = rline1('/proc/' + pid + '/oom_score')
|
oom_score = rline1('/proc/' + pid + '/oom_score')
|
||||||
oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj')
|
oom_score_adj = rline1('/proc/' + pid + '/oom_score_adj')
|
||||||
|
|
||||||
@ -1213,6 +1215,12 @@ def find_victim_info(pid, victim_badness, name):
|
|||||||
|
|
||||||
ancestry = pid_to_ancestry(pid, max_ancestry_depth)
|
ancestry = pid_to_ancestry(pid, max_ancestry_depth)
|
||||||
|
|
||||||
|
if print_victim_cmdline is False:
|
||||||
|
cmdline = ''
|
||||||
|
c1 = ''
|
||||||
|
else:
|
||||||
|
c1 = '\n Cmdline: '
|
||||||
|
|
||||||
if detailed_rss:
|
if detailed_rss:
|
||||||
detailed_rss_info = ' (' \
|
detailed_rss_info = ' (' \
|
||||||
'Anon: {} MiB, ' \
|
'Anon: {} MiB, ' \
|
||||||
@ -1239,7 +1247,7 @@ def find_victim_info(pid, victim_badness, name):
|
|||||||
'\n CGroup_v1: {}' \
|
'\n CGroup_v1: {}' \
|
||||||
'\n CGroup_v2: {}' \
|
'\n CGroup_v2: {}' \
|
||||||
'\n Realpath: {}' \
|
'\n Realpath: {}' \
|
||||||
'\n Cmdline: {}' \
|
'{}{}' \
|
||||||
'\n Lifetime: {}'.format(
|
'\n Lifetime: {}'.format(
|
||||||
round((time() - status0) * 1000),
|
round((time() - status0) * 1000),
|
||||||
name,
|
name,
|
||||||
@ -1257,7 +1265,7 @@ def find_victim_info(pid, victim_badness, name):
|
|||||||
victim_cgroup_v1,
|
victim_cgroup_v1,
|
||||||
victim_cgroup_v2,
|
victim_cgroup_v2,
|
||||||
realpath,
|
realpath,
|
||||||
cmdline, # make it optional!
|
c1, cmdline,
|
||||||
victim_lifetime)
|
victim_lifetime)
|
||||||
|
|
||||||
return victim_info
|
return victim_info
|
||||||
@ -2308,6 +2316,12 @@ print_total_stat = conf_parse_bool('print_total_stat')
|
|||||||
print_proc_table = conf_parse_bool('print_proc_table')
|
print_proc_table = conf_parse_bool('print_proc_table')
|
||||||
forbid_negative_badness = conf_parse_bool('forbid_negative_badness')
|
forbid_negative_badness = conf_parse_bool('forbid_negative_badness')
|
||||||
print_victim_info = conf_parse_bool('print_victim_info')
|
print_victim_info = conf_parse_bool('print_victim_info')
|
||||||
|
|
||||||
|
print_victim_cmdline = conf_parse_bool('print_victim_cmdline')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print_config = conf_parse_bool('print_config')
|
print_config = conf_parse_bool('print_config')
|
||||||
print_mem_check_results = conf_parse_bool('print_mem_check_results')
|
print_mem_check_results = conf_parse_bool('print_mem_check_results')
|
||||||
print_sleep_periods = conf_parse_bool('print_sleep_periods')
|
print_sleep_periods = conf_parse_bool('print_sleep_periods')
|
||||||
|
@ -319,7 +319,7 @@ print_sleep_periods = False
|
|||||||
|
|
||||||
print_total_stat = True
|
print_total_stat = True
|
||||||
|
|
||||||
print_proc_table = True
|
print_proc_table = False
|
||||||
|
|
||||||
Valid values:
|
Valid values:
|
||||||
None
|
None
|
||||||
@ -334,6 +334,8 @@ extra_table_info = cgroup_v1
|
|||||||
|
|
||||||
print_victim_info = True
|
print_victim_info = True
|
||||||
|
|
||||||
|
print_victim_cmdline = False
|
||||||
|
|
||||||
max_ancestry_depth = 1
|
max_ancestry_depth = 1
|
||||||
|
|
||||||
separate_log = False
|
separate_log = False
|
||||||
|
Loading…
Reference in New Issue
Block a user