code: public function getPidByProgramName($name)
      {
          $process = new Process(sprintf('supervisorctl pid %s', $name));
          $process->run();
  
          return $process->getOutput();
      }
docs: Get pid by program name
  
  @param string $name
  
  @return string