Skip to content

Commit

Permalink
cumulus-show-vrf.py: Fix includes (or rather, skipping of)
Browse files Browse the repository at this point in the history
adjust() runs before include(), so the global include would now skip these.
  • Loading branch information
wdoekes committed Apr 6, 2021
1 parent ba10a66 commit 1f8b70e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cumulus-show-vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ def adjust(self, process):
else:
process.cmdline = '{}@{} {}'.format(
name, vrf, rest)

def include(self, process):
# We want to monitor these daemons, but not their
# (grand)children, as they come and go:
if process.has_parent(include_self=False, cmdline__startswith=(
'sshd:@', '/usr/sbin/sshd@')):
return False

return super(ProcessFormatterMixin, self).include(process)

0 comments on commit 1f8b70e

Please sign in to comment.