Fixed the Nvidia GPU index error (#7692)

This commit is contained in:
Tim de Boer
2017-11-09 13:17:30 +01:00
committed by Neil Lathwood
parent d4dab47c75
commit c2ca68a6ec

View File

@@ -30,14 +30,14 @@ $rrd_def = RrdDefinition::make()
->addDataset('rxpci', 'GAUGE', 0)
->addDataset('txpci', 'GAUGE', 0);
foreach ($gpuArray as $gpu) {
foreach ($gpuArray as $index => $gpu) {
$stats = explode(",", $gpu);
$sm_total += $stats[3];
list($gpu, $pwr, $temp, $sm, $mem, $enc, $dec, $mclk, $pclk, $pviol, $tviol,
$fb, $bar1, $sbecc, $dbecc, $pci, $rxpci, $txpci)=$stats;
$rrd_name = array('app', $name, $app_id, $int);
$rrd_name = array('app', $name, $app_id, $index);
$fields = array(
'pwr' => $pwr,