You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kernel version | Linux loft-sparky 3.10.38 v68 #22 SMP PREEMPT Fri Dec 22 10:45:41 IST 2017 armv7l GNU/Linux
SBC model | Sparky SBC (armv7l)
Power supply used | Allo 5v, 3A
SDcard used | SanDisk ultra
Additional Information (if applicable)
Software title | dietpi-config
Was the software title installed freshly or updated/migrated? fresh install
Can this issue be replicated on a fresh installation of DietPi? yes
Steps to reproduce
Flash microSD card with DietPi_SparkySBC-ARMv7-Buster_AlloGUI.img from 2020-09-21
Boot the device and login via ssh
Run dietpi-config
Choose option 3 - Performance Options
Expected behaviour
I should be able to adjust performance options, including CPU Governor, etc.
Actual behaviour
dietpi-config exists with the following message:
/boot/dietpi/dietpi-config: line 1593: 989 - : syntax error: operand expected (error token is "- ")
Extra details
... Remember that Sparky is still on the 3.10.x kernel, so /proc/meminfo looks a bit different. Instead of MemAvailable, we have CmaFree. Perhaps do something like this (reports contiguous free memory, but close enough?)
1592 local memory_free=$(mawk '/MemAvailable:/ || /CmaFree:/{printf "%.0f",$2/1024;exit}' /proc/meminfo)
The text was updated successfully, but these errors were encountered:
Many thanks for your report and the included solution.
Seems like testing with "old" kernel is not enough for Sparky SBC anymore 🤔.
MemFree is available as well, right? AFAIK this is what we used before and, even again not the same, it is at least a reliable fallback where CmaFree reports 0 kB or other very different values in cases, depending on hardware.
Another method, which we actually use everywhere else, is free -m which should have the "total" and "used" values as well. I guess on Sparky, the "available" column is missing?
total used free shared buff/cache available
Mem: 975 251 271 57 451 650
total - used != available
even
total - used - shred != available
so a bid difficult to get close 😄. However, it is for visual information only, nothing else is based on those values, so we'll just take the closest we can get and that's fine then. Could you print both for an overview, please:
@dsnyder0pc
Since MemFree is located above MemAvailable, your attempt with a single mawk call sadly does not work. But in attempt to go with a simpler and more consistent solution, could you please paste the output of free -m on Sparky SBC?
Creating a bug report/issue
Required Information
Additional Information (if applicable)
Steps to reproduce
Expected behaviour
Actual behaviour
Extra details
/proc/meminfo
looks a bit different. Instead ofMemAvailable
, we haveCmaFree
. Perhaps do something like this (reports contiguous free memory, but close enough?)The text was updated successfully, but these errors were encountered: