Files
server_status/block_devices.php
2026-10-15 17:17:16 +07:00

17 lines
203 B
PHP

<?php
function get_devices()
{
exec("lsblk -J", $raw, $retval);
if ($retval != 0) {
return [];
}
$data = json_decode(implode("", $raw));
return $data->blockdevices;
}
?>