The kind people at BananaPi are sending me one of their new BananaPi Zeros to test OH on. It is a pretty impressive little device (same form factor as a RPi Zero but runs a quad core A7 H2+ CPU 1.2 GHz versus the single core 1 GHz in the RPi Zero). So processor wise I’m thinking it will handle openHAB without problem. However, it only comes with 512M of RAM so I have my doubts it can handle OH in that regard.
But I would like to provide a useful write-up after I test which means I need to know more about how much RAM all of your setups are using so I can provide something along the lines of “If you have a simple setup with 5 or fewer add-ons it will work for you.”
So I’m asking everyone who is willing to please provide the following information if they are running on Linux:
- How much memory is your OH using? (see note 1)
- How many active bundles? (see note 2)
- How many Items?
- How many lines of Rules?
I’ll provide some commands you can run to get this information below.
My setup is:
- 4891694 kB
- 133 Active bundles
- 382 Items
- 672 Lines
- From the same machine as OH is running
ps eo vsz,command | grep openhab | grep -v grep | cut -d ' ' -f 1
The number will be the amount of virtual memory used by OH in kB
- This command requires logging in to the Karaf console. The default password is
ssh -p 8101 openhab@localhost 'bundle:list | grep -c Active'
This will print out the number of active bundles. Don’t worry, it will be a largish number as it counts way more than just installed add-ons.
- This command also requires logging in to the Karaf console.
ssh -p 8101 openhab@localhost 'smarthome:items list | grep -c .*'
The number printed out will be the total number of Items
- From the same machine OH is running
wc -l /etc/openhab2/rules/*.rules | tail -n 1
Use the location of your rules files if it is not in the standard ap-get/yum installed locations. The number printed out will be the total number of lines in all of your Rules files. This will include white space and comments.
I realize this is not an accurate measure of the actual amount of memory OH is actually using but it is close enough for my purposes.
This will list all the active bundles which include third-party bundles, the bundles that make up ESh and OH cores, and your installed add-ons.
To get to Mb divide by 1024.
Edit: Noticed I was missing a digit in my memory report. No way is OH running in that little memory.