Skip to content

Commit

Permalink
Merge pull request #281 from leanprover-community/server_capacity
Browse files Browse the repository at this point in the history
Adjust memory to be approx. the same as by htop
  • Loading branch information
matlorr authored Jan 10, 2025
2 parents 39e0819 + 0895821 commit 341a9ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relay/stats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 341a9ae

Please sign in to comment.