top of page

PSULT Process Specific

These methods provide information about individual processes:

  • Creating a Process Object:

    • p = psutil.Process(pid) - Create a Process object for a given PID.

  • Process Information:

    • p.name() - Process name.

    • p.exe() - Process executable path.

    • p.cwd() - Process current working directory.

    • p.status() - Process status (e.g., running, sleeping).

    • p.username() - Username that owns the process.

    • p.create_time() - Time the process was created.

  • Process Resource Usage:

    • p.cpu_percent(interval=1) - CPU usage of the process.

    • p.memory_info() - Memory usage of the process.

    • p.num_threads() - Number of threads used by the process.

  • Process Relationships:

    • p.parent() - Parent process.

    • p.children() - List of child processes.

  • Process Actions:

    • p.terminate() - Terminate the process.

    • p.kill() - Kill the process.

    • p.suspend() - Suspend the process.

    • p.resume() - Resume the process.

bottom of page