I created a System Widget with Habpanel to monitor my setup. I measure the power consumption as well as the CPU load. I recognized that pretty often my power consumption doubles or even more although the macmini is “only” running openhab and teamviewer for maintenance reasons. i opened the activity monitor to see what’s going on and java proces wass at 150% cpu load for hours until i decided to restart the system.
Unfortunately i have no clue how i could identify the problem - maybe it’s a faulty binding (i only installed the sony devices binding manually) or what else could be responsible …
and what i get is a huge list.
Unfortunately I also don’t know what i am searching for i am a bit lost and would appreciate help very much!
I tried to identify the time stamp when this happens and checked the openhab.log and event.log as well as the computers system log files but could not find anything suspicious …
EDIT: Seems like i cannot access the karaf console via
ssh -p 8101 openhab@localhost
anymore now. I think that might have something to do with that issue …
Should i create a bug report on Github? I did never do that and don’t know which data to provide. do you think my logs are sufficient?
No what you give is absolutely not sufficient. Noone can help you there as long as you don’t provide more insight because it is not a well known problem to occur everywhere.
So there is something specific you did or do to cause this, and that in turn noone but you can know.
You need to find out yourself. Do a strace() [or however that’s called on MacOS, I don’t know] or use a Java profiler to find out what Java does in that state.
Migrate to openHABian on RPi to see if it happens there, too.
Delete the cache.
Setup OH again from scratch.
Enable debugging for rules processing (read the docs about logging and start with log:set debug org.eclipse.smarthome.model.script and extend to org.eclipse.smarthome or org.openhab if that does not give any hints).
If something on your box changes any of the source items or rules files, this results in a lot recompilation, making java CPU jump to 100+%. The aforementioned logging level would create log lines in that case to give a hint).
Maybe you yourself edit files in place or your editor works that way (intermediate saves?).
But please stop writing posts expecting someone to take you by the hand and debug the thing for you.
That won’t happen. Es gibt hier nur Hilfe zur Selbsthilfe, und MacOS benutzt halt kaum jemand.
Thank you for your hints. I will try that i am happy to help myself but i did not know where to start. I will try to look at the logging after enabling debugging and if that does not help i will start from 0 and install one binding after the other to see what’s going wrong. i don’t know if mac os is the main issue but we will see
just a little update.
I activated the debug modes you suggested and could not find anything suspicious in the time slot the cpu load went up so i tried to analyze the java threads - i am just not skilled enough to dig that deep or lets say i won’t find out which thread is suspicious because i do not know what to look at.
There is no CPU load bar next to the threads only a state (running, sleeping park).
So I started from scratch and added half of the bindings first and i did not have the problem for days. I added one binding after another to see if the problem occurs again but everything seemed fine. Now i have the issue again and I will start over again with an even longer wait time between the additions to confirm functionality. Can you provide a link to a tutorial on how to use java analyzers? I am using VisualVM at the moment, read a lot but did not make any progress.
I had no rules added to my config and excluded the OpenHAB folder from system search and backup (in case of the OS doing something with the files).
I also switched from Zulu8 to the Java 8 Oracle version But the problem still occured.
I will now try to go back to OH 2.4 and i ordered a raspberry pi to see if the problem comes from the OS.
i thought i got rid of that behavior because my machine was good for more than 2 weeks but i did not as it turns out.
maybe i should try running a virtualbox with openhabian in it …
for now i am rebooting daily as i cannot see where the problem comes from.
even a friend of mine (software developer) could not help me while trying to investigate for hours.
java seems to be a bitch
but yeah - maybe it’s a mac os specific thing. I hope i’ll get this fixed with the vm.
I created a virtual vm with ubuntu server and now i don’t have the issue anymore … i cannot see where it came from but i am happy now