Ask our Experts
Didn't find what you are looking for? Ask our experts!
Share Your Feedback – Help Us Improve Search on Community! Please take a few minutes to participate in our Search Feedback Survey. Your insights will help us deliver the results you need faster and more accurately. Click here to take the survey
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.
Search in
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
You’ve reached the end of your document
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.