If you haven't heard of the screen command backtick
since then, this could be your favourite (http://aperiodic.net/screen/commands:backtick).
You can for example define a series of linux ($BASH or sh) commands which echoes your own calculated load value and your own calculated mem-usage value within the backtick
command.
In this example let's assume that you just want to display the second value of the "load average" statistic given by "uptime" (the 5 minutes statistic).
Step 1:
If your "uptime" output would look like this (with a space at the beginning of the line and 2 spaces before "load average:")...
17:04:06 up 3 days, 21:52, 12 users, load average: 0.36, 0.27, 0.21
... you could extract your value like this into the variable cpuLoad (and get rid of the trailing "comma"):
cpuLoad=$(cut -s -d\ -f13 <(uptime))
cpuLoad=${cpuLoad:0:-1}
Step 2:
Similarily you could extract your memory values from the output of the "free" command and do some calculations explained in this fine article which would end up in a variable named memLoad (abbreviated here by "memLoad=...").
Step 3:
Put it all together and echo your output as you would like to see it:
backtick 1 5 5 /bin/bash -c 'cpuLoad=$(cut -s -d\ -f13 <(uptime)); cpuLoad=${cpuLoad:0:-1}; memLoad=...; echo "CPU load ${cpuLoad} Mem Load ${memLoad}" '
This will update every 5 seconds the values in your hardstatus or caption status-lines, using the escape-sequence "%1`" in your "hardstatus string" definition.
For more calculations you will need more space which has to be all on one line. So put it in a shell function and call the function from within your screenrc file:
backtick 1 5 5 /bin/bash -c '_mySystemLoadScreenFunction'
What also did not work for me was using $BASH instead of the full path.
This did NOT work:
backtick 1 5 5 $BASH -c '_mySystemLoadScreenFunction'
Hope, this helps.
Thank you very much for your attention.