mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 10:38:50 -05:00
webGui: reorganize how the device ids are displayed on the System Devices page
This commit is contained in:
@@ -21,9 +21,14 @@ Title="System Devices"
|
||||
<p class="notice">Warning: Your system has booted with the PCIe ACS Override setting enabled. The below list doesn't not reflect the way IOMMU would naturally group devices. To see natural IOMMU groups for your hardware, go to the <b><a href="/Settings/VMSettings">VM Settings</a></b> page and set the <b>PCIe ACS Override</b> setting to <b>No</b>.</p>
|
||||
<?endif;?>
|
||||
<pre><?
|
||||
$iommu_groups = shell_exec('for iommu_group in $(ls /sys/kernel/iommu_groups/ -1 | sort -n);do echo "IOMMU group $iommu_group"; for device in $(ls -1 "/sys/kernel/iommu_groups/$iommu_group"/devices/); do echo -n $\'\t\';lspci -nns "$device"; done; done');
|
||||
$iommu_groups = shell_exec('for iommu_group in $(ls /sys/kernel/iommu_groups/ -1 | sort -n);do echo "IOMMU group $iommu_group"; for device in $(ls -1 "/sys/kernel/iommu_groups/$iommu_group"/devices/); do echo -n $\'\t\';lspci -ns "$device" | awk \'BEGIN{ORS=" "}{ print "["$3"]" }\';lspci -s "$device"; done; done');
|
||||
if (empty($iommu_groups)) {
|
||||
$iommu_groups = shell_exec("lspci -nn");
|
||||
$iommu_groups = explode("\n", shell_exec("lspci -n | awk '{ print \"[\"\$3\"]\" }'"));
|
||||
$i = 0;
|
||||
foreach (explode("\n", shell_exec("lspci")) as $strDesc) {
|
||||
$iommu_groups[$i++] .= " $strDesc";
|
||||
}
|
||||
$iommu_groups = implode("\n", $iommu_groups);
|
||||
}
|
||||
echo $iommu_groups;
|
||||
?></pre>
|
||||
|
||||
Reference in New Issue
Block a user