Merge branch 'main' into check_upload_size

This commit is contained in:
matlorr
2025-01-31 09:22:32 +01:00
4 changed files with 42 additions and 27 deletions
+4 -4
View File
@@ -3,10 +3,10 @@
# Load python interpreter
python=/usr/bin/python3
# Load python script
cpu_usage=$L4G_DIR/lean4game/relay/cpu_usage.py
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%.2f, %.2f\n" $cpu $mem
printf "CPU, MEM\n%f, %f\n" $cpu $mem