telemetry.internal.util.ps_util | index telemetry/internal/util/ps_util.py

`# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |

atexit | inspect | logging | os

Functions
`` |  |

EnableListingStrayProcessesUponExitHook()

GetChildPids(processes, pid)
  `Returns all child processes of |pid| from the given |processes| list.
  Args:
  processes: A tuple of (pid, ppid, state) as generated by ps.
  pid: The pid for which to get children.
  Returns:
  A list of child pids.`

GetPsOutputWithPlatformBackend(platform_backend, columns, pid)
  `Returns output of the 'ps' command as a list of lines.
  Args:
  platform_backend: The platform backend (LinuxBasedPlatformBackend or
  PosixPlatformBackend).
  columns: A list of require columns, e.g., ['pid', 'pss'].
  pid: If not None, returns only the information of the process with the pid.`