This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

System parameters
#1
Hi,

I would like to log some system parameters such as cpu load, system temperature, memory, network activity, KNX bus activity, etc.

So far I have only been able to figure out cpu load (cat /proc/loadavg) and memory (free).

How can I get the other system parameters?


Thanks.
Reply
#2
Nobody knows?

Thanks.
Reply
#3
Here you have some documentation which you can use to check some parameters(network, mounts, disk space):
proc file system
[url=https://www.centos.org/docs/5/html/5.1/Deployment_Guide/ch-proc.htmlhttps://www.centos.org/docs/5/html/5.1/Deployment_Guide/ch-proc.html][/url]
Example of checking memory usage:
Code:
f = assert (io.popen("cat /proc/meminfo"))
response = {}
for line in f:lines() do
 table.insert(response, line)
end -- for loop
 
f:close()
log(response)

Example of checking how many and what are the names of files on '/home/ftp/':
Code:
f = assert (io.popen ("ls /home/apps"))
response = {}
for line in f:lines() do
 table.insert(response, line)
end -- for loop
 
f:close()
log('There are ' .. #response .. ' files on the server.',response)
Reply
#4
For network activity, you can get current stats like this:
Code:
require('ifinfo')
stats = ifinfo().eth0
log(stats)

You will still have to store older values somewhere if you want to get stats for the current hour/day/etc.
There's no API for getting KNX stats at the moment, but it might get added in the next FW.
Reply
#5
Thanks for this.

Where can I find info on temperature? I can't find it in the standard places. From time to time I have temperature warnings so I would like to keep track of this.
Reply
#6
TP-UART chip which generates temperature warning does not provide the temperature value Sad
Reply
#7
Too bad [Image: sad.png]

I might try to stick a 1-wire temp sensor to the LM just to have some indication...
Reply
#8
Hi
How about KNX BUS load? Is there this value available in LM?
Thank you.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#9
In next FW release there will be a function called knxlib.getstats() which will return the numbe of IP and TP telegrams sent/received. Total bus load can be calculated from these values.
Reply
#10
(13.03.2017, 10:33)Thomas Wrote: Hi
How about KNX BUS load? Is there this value available in LM?
Thank you.

You can also do something like this:
Code:
-- Checking how many object from database was updated in last 5 seconds
delta=os.microtime() - 5
query = "SELECT name FROM objects WHERE updatetime>" .. delta
updated = db:getall(query)

log(#updated)

It gives an info about how many objects from database was updated in the last 5 seconds(if 1 object was updated a few times in this 5 seconds it would't be counted). You can also change this 5 second to other value e.g. 1s.
Reply
#11
Hi,

This also include grp.update and is not part of the busload, combined with the multiple triggered items within the time period it's not a trustfull methode..

I would wait for next FW where new knx.lib function will be available..

BR,

Erwin
Reply


Forum Jump: