Options
All
  • Public
  • Public/Protected
  • All
Menu

Module index

Index

Type aliases

ExecResult

ExecResult: { child: ChildProcess; stderr: string; stdout: string }

Type declaration

  • child: ChildProcess
  • stderr: string
  • stdout: string

ProcessInfo

ProcessInfo: { command: string; pid: number; ppid: number }

Process Info

Type declaration

  • command: string

    Command that started process

  • pid: number

    Process ID

  • ppid: number

    Parent Process ID

ProcessTreeInfo

ProcessTreeInfo: ProcessInfo & { level: number }

Process Info for children tree

Functions

getChildrenOfPid

  • getChildrenOfPid

    find all child processes of a process ID from a list

    Parameters

    • ppid: number

      ID for parent process

    • procs: ProcessInfo[]

      List of processes

    Returns ProcessTreeInfo[]

    array of children process for ppid

ps

  • ps

    Get list of system processes

    Returns Promise<ProcessInfo[]>

    array of processes

psChildren

  • psChildren

    List all child processes of a process ID

    Parameters

    • ppid: number

      ID for parent process

    Returns Promise<ProcessTreeInfo[]>

    array of children process for ppid

Generated using TypeDoc