only go back 5 mins
This commit is contained in:
parent
a2e29d64d2
commit
c726779f6e
@ -14,7 +14,7 @@ blink_led() {
|
|||||||
|
|
||||||
# check if brcm is stuck
|
# check if brcm is stuck
|
||||||
check_brcm() {
|
check_brcm() {
|
||||||
if [[ "$(journalctl -n10 -k | grep -c 'brcmf_cfg80211_nexmon_set_channel.*Set Channel failed')" -ge 5 ]]; then
|
if [[ "$(journalctl -n10 -k --since '5 minutes ago' | grep -c 'brcmf_cfg80211_nexmon_set_channel.*Set Channel failed')" -ge 5 ]]; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
@ -24,7 +24,7 @@ class Watchdog(plugins.Plugin):
|
|||||||
|
|
||||||
def on_epoch(self, agent, epoch, epoch_data):
|
def on_epoch(self, agent, epoch, epoch_data):
|
||||||
# get last 10 lines
|
# get last 10 lines
|
||||||
last_lines = ''.join(list(TextIOWrapper(subprocess.Popen(['journalctl','-n10','-k'],
|
last_lines = ''.join(list(TextIOWrapper(subprocess.Popen(['journalctl','-n10','-k', '--since', '"5 minutes ago"'],
|
||||||
stdout=subprocess.PIPE).stdout))[-10:])
|
stdout=subprocess.PIPE).stdout))[-10:])
|
||||||
if len(self.pattern.findall(last_lines)) >= 5:
|
if len(self.pattern.findall(last_lines)) >= 5:
|
||||||
display = agent.view()
|
display = agent.view()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user