public function status() : array
    {
        $this->reloadPids();

        $workerStatus = [];
        if (empty($this->pids)) {
            return $workerStatus;
        }

        $Client = new \GearmanClient();
        $Client->addServer($this->gearmanHost, $this->gearmanPort);
        $Client->setTimeout(1000);
        foreach ($this->pids as $pool => $workerPids) {
            $workerStatus[$pool] = [];
            foreach ($workerPids as $workerName => $workerPid) {
                // raises php warning on timeout so we need the "evil @" here...
                $workerStatus[$pool][$workerName] = false;
                $start = microtime(true);
                $pong = @$Client->doHigh('ping_'.$workerName, 'ping');
                if ($pong === 'pong') {
                    $jobinfo = @$Client->doHigh('jobinfo_'.$workerName, 'foo');
                    $jobinfo = json_decode($jobinfo, true);
                    $workerStatus[$pool][$workerName] = $jobinfo;
                    $pingtime = microtime(true) - $start;
                    $workerStatus[$pool][$workerName]['ping'] = $pingtime;
                    $workerStatus[$pool][$workerName]['status'] = 'idle';
                } else {
                    $workerStatus[$pool][$workerName]['jobs_total'] = 'n/a';
                    $workerStatus[$pool][$workerName]['avg_jobs_min'] = 'n/a';
                    $workerStatus[$pool][$workerName]['uptime_seconds'] = 0;
                    $workerStatus[$pool][$workerName]['ping'] = 0;
                    $workerStatus[$pool][$workerName]['status'] = 'busy';
                }
            }
        }

        return $workerStatus;
    }