mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-24 01:31:44 +00:00
Use MemAvailable rather than MemFree (#914)
Fixes linux metrics reporting to report mem free before swap starts, instead of physical unused ram https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
This commit is contained in:
@@ -32,7 +32,7 @@ public class LinuxCmds extends CmdBase {
|
||||
cpuUptimeCommand = "uptime -p | cut -c 4-";
|
||||
|
||||
// RAM
|
||||
ramUsageCommand = "awk '/MemFree:/ {print int($2 / 1000);}' /proc/meminfo";
|
||||
ramUsageCommand = "awk '/MemAvailable:/ {print int($2 / 1000);}' /proc/meminfo";
|
||||
|
||||
// Disk
|
||||
diskUsageCommand = "df ./ --output=pcent | tail -n +2";
|
||||
|
||||
Reference in New Issue
Block a user