Prose\FromHost::getPid PHP Method

getPid() public method

public getPid ( string $processName ) : integer
$processName string
return integer
    public function getPid($processName)
    {
        // log some info to the user
        $log = usingLog()->startAction("get id of process '{$processName}' running on VM '{$this->args[0]}'");
        // make sure we have valid host details
        $hostDetails = $this->getHostDetails();
        // get an object to talk to this host
        $host = OsLib::getHostAdapter($this->st, $hostDetails->osName);
        // get the information
        $return = $host->getPid($hostDetails, $processName);
        // success
        $log->endAction("pid is '{$return}'");
        return $return;
    }