Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Console/Commands/TelemetryCommand.php
7460 views
1
<?php
2
3
namespace Pterodactyl\Console\Commands;
4
5
use Illuminate\Console\Command;
6
use Symfony\Component\VarDumper\VarDumper;
7
use Pterodactyl\Services\Telemetry\TelemetryCollectionService;
8
9
class TelemetryCommand extends Command
10
{
11
protected $description = 'Displays all the data that would be sent to the Pterodactyl Telemetry Service if telemetry collection is enabled.';
12
13
protected $signature = 'p:telemetry';
14
15
/**
16
* TelemetryCommand constructor.
17
*/
18
public function __construct(private TelemetryCollectionService $telemetryCollectionService)
19
{
20
parent::__construct();
21
}
22
23
/**
24
* Handle execution of command.
25
*
26
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
27
*/
28
public function handle()
29
{
30
$this->output->info('Collecting telemetry data, this may take a while...');
31
32
VarDumper::dump($this->telemetryCollectionService->collect());
33
}
34
}
35
36