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.

Memory Usage
#1
Sad 
Hello!

I'm have a problem with the memory load/usage on my LM Ambient.
Whenever i reset the LM Ambient, the Memory load is around 15-19%, but each day it increases by 2-4%. 
A few days ago the load was at 90%, so I tried installing the newest firmware, but the same thing keeps happening.

Is there a possibility that any of my scripts could be causing this? I'm relatively new to LUA so it would be fair to assume that this might be of my own doing!

Some additional info

I have attached my trend logs.
No object logs are active.
I'm only using Z-Wave products, about 40 of them are connected to my LM.

A function/user.library that is called every 1 second for 4 different light zones in the same resident script

Code:
function auto_lysstyring(auto_on, nattsenking, sensor, light_type, light_control, dim_value_day, dim_value_night, off_time)

 
 if grp.getvalue(auto_on) == true then

 
    offtime = off_time -- Tid i minutter for å slå av lys etter siste bevegelse
    dim_day = dim_value_day -- Dimmeverdi på dagtid
    dim_night = dim_value_night -- Dimmeverdi etter nattsenking

    nattsenk = grp.getvalue(nattsenking) -- Henter nattsenk status true/false
    mov_sensor = grp.getvalue(sensor) -- Sjekker bevegelse i rommet
 light_type_check = light_type
 light_control_check = grp.getvalue(light_control)

 obj_find = grp.find(sensor)
    delta = os.time() - obj_find.updatetime


 
 
   if light_type_check == 1 then -- Light type 1 for dimming
     if mov_sensor == true then
       if light_control_check < 10 then
         if nattsenk == true then
           grp.update(light_control, dim_night)
           elseif nattsenk == false then
           grp.update(light_control, dim_day)  
         end  
       end
     end
     
     if mov_sensor == false and delta >= offtime * 60 then
       if light_control_check > 0 then
         grp.update(light_control, 0)  
       end
     end
   end
   
   if light_type_check == 0 then -- Light type 1 for av/på
     if mov_sensor == true then
       if light_control_check ==false then
         grp.update(light_control, true)  
       end  
     end
     
     if mov_sensor == false and delta >= offtime * 60 then
       if light_control_check == true then
         grp.update(light_control, false)
       end
       
     end
     
   end
   
 else
 end
 
end

A resident script that runs every 5 seconds
Code:
obj_find = grp.find('1/1/35') -- Gesture sensor value
delta = os.time() - obj_find.updatetime




if delta >= 5 and delta < 9.99 then
 gesture = grp.getvalue('1/1/35')
-- Green light, ECO Mode. Sets thermostats to ECO and turns off all lights
if gesture == 1 then
 
 -- upate HVAC MODE to ECO
 grp.update('1/1/66', 3)
 
 -- Turn off all lights
 bit_objects = grp.tag('ALT_AV_BIT')
    byte_objects = grp.tag('ALT_AV_BYTE')
 for index, value in ipairs(bit_objects) do
     grp.update(value.address, false)
    end

    for index, value in ipairs(byte_objects) do
     grp.update(value.address, 0)
    end
 
end

-- Orange light, Comfort mode. Sets thermostats to Comfort, lights are untouched.
if gesture == 2 then
 -- upate HVAC MODE to Comfort
 grp.update('1/1/66', 1)
end

-- Black Light, turns off all lights.
if gesture == 3 then
 -- Turn off all lights
 bit_objects = grp.tag('ALT_AV_BIT')
    byte_objects = grp.tag('ALT_AV_BYTE')
 for index, value in ipairs(bit_objects) do
     grp.update(value.address, false)
    end

    for index, value in ipairs(byte_objects) do
     grp.update(value.address, 0)
    end
 
end

-- yellow Light, turns on all lights.
if gesture == 4 then
 -- Turn off all lights
 bit_objects = grp.tag('ALT_AV_BIT')
    byte_objects = grp.tag('ALT_AV_BYTE')
 for index, value in ipairs(bit_objects) do
   grp.update(value.address, true)
    end

    for index, value in ipairs(byte_objects) do
     grp.update(value.address, 90)
    end
 
end
end
A resident script that runs every 60 seconds
Code:
-- get an array of objects tagged 'tag name'
myobjects = grp.tag('Battery')
batteryfails = 0

-- arraytable = { 'a', 'b', 'c' }
for index, value in ipairs(myobjects) do
 batterycheck = grp.getvalue(value.address)
 if batterycheck < 10 then --rapporterer alle batterier under 10%
   batteryfails = batteryfails + 1

end
 

 
end



if batteryfails > 0 then
       grp.update('1/1/105', batteryfails)
 grp.update('1/1/104', true)
elseif batteryfails == 0 and grp.getvalue('1/1/104') == true then
 grp.update('1/1/105', batteryfails)
 grp.update('1/1/104', false)
end

Attached Files Thumbnail(s)
   
Reply
#2
Run this script and post what you get in Logs:
Code:
res = io.readproc("ps | grep -v '\\['")
log(res)
Reply
#3
Code:
Dummyscript 12.09.2017 11:18:34
* string:   PID USER       VSZ STAT COMMAND
   1 root      1088 S    /sbin/init
 609 root      1108 S    /sbin/syslogd -C16
 611 root      1088 S    /sbin/klogd
 613 root       848 S    /sbin/hotplug2 --override --persistent --set-rules-f
 793 root      1088 S    /sbin/watchdog -t 5 /dev/watchdog
 889 root       716 S    /usr/sbin/gpiod -i -l /lib/restore/defaults.sh -d /l
 898 root      1092 S    /usr/sbin/ntpd -n -p 0.europe.pool.ntp.org -p 1.euro
 908 root      3108 S <  /usr/bin/eibd -e 15.15.255 -q 100 -D -L 1 -Q 0 -T -S
 912 root     13680 S    /usr/sbin/redis-server /etc/redis.conf
1414 root      2412 S    lua /lib/genohm-scada/core/scenes.lua
1416 root      2652 S    lua /lib/genohm-scada/core/groupmonitor.lua
1424 root      2508 S    lua /lib/genohm-scada/plugins/ble/bgscan.lua
1428 root      4416 S    lua /lib/genohm-scada/plugins/enocean/daemon.lua
1430 root      2728 S    lua /lib/genohm-scada/plugins/lmwall/daemon-sensors.
1431 root      2228 S    lua /lib/genohm-scada/plugins/lmwall/daemon-led.lua
1432 root      2552 S    lua /lib/genohm-scada/plugins/lmwall/daemon-apds.lua
1434 root      2552 S    lua /lib/genohm-scada/plugins/w1/daemon.lua
1453 root      1576 S    owserver --i2c=/dev/i2c-0:0 -p 127.0.0.1:4304
1458 root      2300 R    lua /lib/genohm-scada/core/scripting-resident.lua 26
1462 root      2224 S    lua /lib/genohm-scada/core/scripting-resident.lua 28
1468 root      2324 S    lua /lib/genohm-scada/core/scripting-resident.lua 32
1509 root      3648 S    nginx: master process nginx -c /etc/nginx.conf
1510 root      5848 S    nginx: worker process
1524 root      1096 S    /usr/sbin/crond -l 20 -c /etc/crontabs
6110 root      2540 S    lua /lib/apps/daemon.lua zwaveapp /home/apps/store/d
6148 root      2148 S    /home/apps/usr/sbin/zwave /home/apps/usr/share/openz
6149 root      7780 S    /home/apps/usr/sbin/zwave /home/apps/usr/share/openz
8746 root      1092 R    ps
Reply
#4
That looks normal, do you have many trends created? Can you check how much is /tmp using in system config > status > system status > partitions?
Reply
#5
My trend logs are attached as a picture in the first post. 
I have attached a picture of the partitions in this one.

Attached Files Thumbnail(s)
   
Reply
#6
Can you provide remote access to your device? Please contact us by e-mail.
Reply


Forum Jump: