Page MenuHomePhabricator
Paste P1417

daemons.php
ActivePublic

Authored by epriestley on Nov 12 2014, 9:20 PM.
Tags
None
Referenced Files
F232953: daemons.php
Nov 12 2014, 9:20 PM
Subscribers
None
<?php
require_once 'scripts/__init_script__.php';
$environment_hash = PhabricatorEnv::calculateEnvironmentHash();
echo "Hash for this CLI environment: {$environment_hash}\n";
$all_daemons = id(new PhabricatorDaemonLogQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE)
->execute();
if ($all_daemons) {
foreach ($all_daemons as $daemon) {
$id = $daemon->getID();
$host = $daemon->getHost();
$pid = $daemon->getPID();
$hash = $daemon->getEnvHash();
echo "Daemon {$id} {$host} {$pid} {$hash}\n";
}
} else {
echo "Found no running daemons.\n";
}

Event Timeline

epriestley changed the title of this paste from untitled to daemons.php.
epriestley updated the paste's language from autodetect to autodetect.