diff --git a/src/Recorders/Servers.php b/src/Recorders/Servers.php index 5dc0cca3..6e31ba6e 100644 --- a/src/Recorders/Servers.php +++ b/src/Recorders/Servers.php @@ -136,7 +136,7 @@ protected function memory(): array $memoryUsed = match (PHP_OS_FAMILY) { 'Darwin' => $memoryTotal - intval(intval(shell_exec("vm_stat | grep 'Pages free' | grep -Eo '[0-9]+'")) * intval(shell_exec('pagesize')) / 1024 / 1024), // MB - 'Linux' => $memoryTotal - intval(shell_exec("cat /proc/meminfo | grep MemAvailable | grep -E -o '[0-9]+'")) / 1024, // MB + 'Linux' => $memoryTotal - intval(intval(shell_exec("cat /proc/meminfo | grep MemAvailable | grep -E -o '[0-9]+'")) / 1024), // MB 'Windows' => $memoryTotal - intval(((int) trim((string) shell_exec('wmic OS get FreePhysicalMemory | more +1'))) / 1024), // MB 'BSD' => intval(intval(shell_exec("( sysctl vm.stats.vm.v_cache_count | grep -Eo '[0-9]+' ; sysctl vm.stats.vm.v_inactive_count | grep -Eo '[0-9]+' ; sysctl vm.stats.vm.v_active_count | grep -Eo '[0-9]+' ) | awk '{s+=$1} END {print s}'")) * intval(shell_exec('pagesize')) / 1024 / 1024), // MB default => throw new RuntimeException('The pulse:check command does not currently support '.PHP_OS_FAMILY),