Commit d70aa16f authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Reland "Print ps in intervals while the process is running"

This is a reland of 50c6d8d3

Original change's description:
> 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>

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

Bug: 1074355
Change-Id: I488b521e4a3b859c37f0bb1e21cad7d037f8f97e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2169392Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
parent 7d66c798
......@@ -117,11 +117,16 @@ class PsPrinter(object):
self.active = sys.platform.startswith('linux2')
self.thread = None
@staticmethod
def print_pstree():
def print_pstree(self):
"""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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment