Merge pull request #281 from leanprover-community/server_capacity

Adjust memory to be approx. the same as by htop
This commit is contained in:
Matvey Lorkish
2025-01-10 12:18:14 +01:00
committed by GitHub
+2 -2
View File
@@ -6,7 +6,7 @@ python=/usr/bin/python3
cpu_usage=relay/cpu_usage.py
# Execute python script
cpu=$($python $cpu_usage)
# Calculate memory usage by computing used_memory/total_memory
mem=$(free | sed '2q;d' | awk '{print $3/$2}')
# Calculate memory usage by computing 1 - %free_memory
mem=$(free | sed '2q;d' | awk '{print 1 - ($4/$2)}')
printf "CPU, MEM\n%f, %f\n" $cpu $mem