Use a better describing name for OOMAnalyser.oom
This commit is contained in:
parent
adeaef5161
commit
5305326069
@ -352,8 +352,8 @@ class OOMAnalyser(object):
|
|||||||
results = {}
|
results = {}
|
||||||
"""Extracted result"""
|
"""Extracted result"""
|
||||||
|
|
||||||
# Reference to the OOM object
|
# Reference to the OOMEntity object
|
||||||
oom = None
|
oom_entity = None
|
||||||
|
|
||||||
GFP_FLAGS = {
|
GFP_FLAGS = {
|
||||||
'GFP_ATOMIC': {'value': '__GFP_HIGH | __GFP_ATOMIC | __GFP_KSWAPD_RECLAIM'},
|
'GFP_ATOMIC': {'value': '__GFP_HIGH | __GFP_ATOMIC | __GFP_KSWAPD_RECLAIM'},
|
||||||
@ -412,7 +412,7 @@ class OOMAnalyser(object):
|
|||||||
|
|
||||||
def __init__(self, oom):
|
def __init__(self, oom):
|
||||||
self.results = {}
|
self.results = {}
|
||||||
self.oom = oom
|
self.oom_entity = oom
|
||||||
|
|
||||||
def _extract_block_from_next_pos(self, marker):
|
def _extract_block_from_next_pos(self, marker):
|
||||||
"""
|
"""
|
||||||
@ -421,14 +421,14 @@ class OOMAnalyser(object):
|
|||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
block = ''
|
block = ''
|
||||||
if not self.oom.find_text(marker):
|
if not self.oom_entity.find_text(marker):
|
||||||
return block
|
return block
|
||||||
|
|
||||||
line = self.oom.current()
|
line = self.oom_entity.current()
|
||||||
block += "{}\n".format(line)
|
block += "{}\n".format(line)
|
||||||
for line in self.oom:
|
for line in self.oom_entity:
|
||||||
if not line.startswith(' '):
|
if not line.startswith(' '):
|
||||||
self.oom.back()
|
self.oom_entity.back()
|
||||||
break
|
break
|
||||||
block += "{}\n".format(line)
|
block += "{}\n".format(line)
|
||||||
return block
|
return block
|
||||||
@ -445,14 +445,14 @@ class OOMAnalyser(object):
|
|||||||
self.REC_PID_KERNELVERSION,
|
self.REC_PID_KERNELVERSION,
|
||||||
self.REC_SWAP,
|
self.REC_SWAP,
|
||||||
]:
|
]:
|
||||||
match = rec.search(self.oom.text)
|
match = rec.search(self.oom_entity.text)
|
||||||
if match:
|
if match:
|
||||||
self.results.update(match.groupdict())
|
self.results.update(match.groupdict())
|
||||||
|
|
||||||
for groupname, rec in [('mem_node_info', self.REC_MEM_NODEINFO),
|
for groupname, rec in [('mem_node_info', self.REC_MEM_NODEINFO),
|
||||||
('process_table', self.REC_PROCESSES),
|
('process_table', self.REC_PROCESSES),
|
||||||
]:
|
]:
|
||||||
match = rec.search(self.oom.text)
|
match = rec.search(self.oom_entity.text)
|
||||||
if match:
|
if match:
|
||||||
self.results[groupname] = match.group()
|
self.results[groupname] = match.group()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user