SpaceLogic KNX Forum
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Link copied. Please paste this link to share this article on your social media post.
With Lua script, is it possible to read the spaceLynks CPU load and memory usage and transfer the values to group objects for monitoring, logging and alarming?
Link copied. Please paste this link to share this article on your social media post.
Yes,
here's a script that will give memory usage in MB and
5-minute load average value:
data = io.readfile('/proc/meminfo')
total = data:match('MemTotal:%s+(%d+)')
avail = data:match('MemAvailable:%s+(%d+)')
used = (tonumber(total) - tonumber(avail)) / 1000
data = io.readfile('/proc/loadavg')
load = tonumber(data:split(' ')[ 1 ])
log(used, load)
Link copied. Please paste this link to share this article on your social media post.
Yes,
here's a script that will give memory usage in MB and
5-minute load average value:
data = io.readfile('/proc/meminfo')
total = data:match('MemTotal:%s+(%d+)')
avail = data:match('MemAvailable:%s+(%d+)')
used = (tonumber(total) - tonumber(avail)) / 1000
data = io.readfile('/proc/loadavg')
load = tonumber(data:split(' ')[ 1 ])
log(used, load)
Link copied. Please paste this link to share this article on your social media post.
Many thanks
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.