fff-nodewatcher: add available memory to data

The "available" amount of memory is helpful for several forensic
and debugging cases. Send it via alfred.

Monitoring support has already been implemented.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
Adrian Schmutzler 2021-02-26 17:44:51 +01:00 committed by Fabian Bläse
parent 3147a33c52
commit 1158e0bb24
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fff-nodewatcher
PKG_RELEASE:=60
PKG_RELEASE:=61
include $(INCLUDE_DIR)/package.mk

View File

@ -39,6 +39,7 @@ SYSTEM_DATA="$SYSTEM_DATA$uptime"
memory=$(awk '
/^MemTotal/ { printf "<memory_total>"$2"</memory_total>" }
/^MemAvail/ { printf "<memory_available>"$2"</memory_available>" }
/^Cached:/ { printf "<memory_caching>"$2"</memory_caching>" }
/^Buffers/ { printf "<memory_buffering>"$2"</memory_buffering>" }
/^MemFree/ { printf "<memory_free>"$2"</memory_free>" }