Skip to content

Commit 1b10a6a

Browse files
author
Eliot Eshelman
committed
Bugfix for computing free memory on newer systems
1 parent 8e539ab commit 1b10a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/microway/interactive_screenrc.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
backtick 1 60 60 ${SLURM_PATH}/squeue --noheader --jobs=${SLURM_JOB_ID} --format="%L"
4040

4141
# Define backtick ID #2 to show CPU usage and available memory
42-
backtick 2 60 60 bash -ic "echo 'Load: '; cut -f1 -d' ' /proc/loadavg; echo ', '; free -m | awk '/buffers[/]cache/ {print \$4}'; echo 'MB free'"
42+
backtick 2 60 60 bash -ic "echo 'Load: '; cut -f1 -d' ' /proc/loadavg; echo ', '; awk '/MemAvailable:|\^MemFree:|\^Buffers:|\^Cached:/ {if (\$1 == \"MemAvailable:\") {sum=\$2; exit;} else {sum+=\$2}} END {print sum/(1024*1024)}' /proc/meminfo; echo ' GB free'"
4343

4444

4545
# Configure the status bar at the bottom of the screen session

0 commit comments

Comments
 (0)