libb.process_by_name_and_port

process_by_name_and_port(name, port)[source]

Find a process by name listening on a specific port.

Parameters:
  • name (str) – Process name to search for.

  • port (int) – Port number to match.

Returns:

psutil.Process if found, None otherwise.

See also

See tests/test_proc.py for usage examples.