diff --git a/app/Models/Server.php b/app/Models/Server.php index 767327b8e4..57ca07d403 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -623,7 +623,7 @@ public function getMemoryMetrics(int $mins = 5) public function getDiskUsage(): ?string { - return instant_remote_process(['df / --output=pcent | tr -cd 0-9'], $this, false); + return instant_remote_process(['df "$(docker info --format \'{{.DockerRootDir}}\')" --output=pcent | tr -cd 0-9'], $this, false); // return instant_remote_process(["df /| tail -1 | awk '{ print $5}' | sed 's/%//g'"], $this, false); } @@ -1271,7 +1271,7 @@ public function updateWithPrivateKey(array $data, ?PrivateKey $privateKey = null public function storageCheck(): ?string { $commands = [ - 'df / --output=pcent | tr -cd 0-9', + 'df "$(docker info --format \'{{.DockerRootDir}}\')" --output=pcent | tr -cd 0-9', ]; return instant_remote_process($commands, $this, false);