Print ps in intervals while the process is running

R=apolito@google.com, ehmaldonado@chromium.org

Bug: 1074355
Change-Id: Id2d5c8ca6f27fefb0fe8d769ae2e50dbaaddadbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2167221
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
changes/21/2167221/2
Josip Sokcevic 6 years ago committed by LUCI CQ
parent a57cf48d52
commit 50c6d8d348

@ -117,11 +117,16 @@ class PsPrinter(object):
self.active = sys.platform.startswith('linux2')
self.thread = None
@staticmethod
def print_pstree():
"""Debugging function used to print "ps auxwwf" for stuck processes."""
# Add new line for cleaner output
print()
subprocess.call(['ps', 'auxwwf'])
# Restart timer, we want to continue printing until the process is
# terminated.
self.poke()
def poke(self):
if self.active:
self.cancel()

Loading…
Cancel
Save