Systeminfo

@jan_b, I’ve been dwelling on this and ran a virtual machine with freebsd. I cloned the JNA repo and built the file you need.

https://github.com/BClark09/jna/blob/freebsd-64-newjar/lib/native/freebsd-x86-64.jar

Does this work or change the error in anyway?

@Benjy Sry i was ill for some time and couldnt look at screens. Thx for your effort but your jar seems to be incompatible or better has a programming flaw. It throws the following error :

2017-07-13 21:39:55.631 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing ‘systeminfo:computer:openhab’: java.lang.ExceptionInInitializerError
java.util.concurrent.ExecutionException: java.lang.ExceptionInInitializerError
at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_131]
at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_131]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[98:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager.doInitializeHandler(ThingManager.java:738)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager.initializeHandler(ThingManager.java:664)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager.access$12(ThingManager.java:639)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager$2.apply(ThingManager.java:681)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager$2.apply(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.bundleFinished(BundleProcessorVetoManager.java:68)[94:org.eclipse.smarthome.config.core:0.9.0.b5]
at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor.informListeners(AbstractAsyncBundleProcessor.java:253)[97:org.eclipse.smarthome.config.xml:0.9.0.b5]
at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor.access$3(AbstractAsyncBundleProcessor.java:251)[97:org.eclipse.smarthome.config.xml:0.9.0.b5]
at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor$1.run(AbstractAsyncBundleProcessor.java:242)[97:org.eclipse.smarthome.config.xml:0.9.0.b5]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.lang.ExceptionInInitializerError
at oshi.jna.platform.unix.freebsd.Libc.(Libc.java:36)
at oshi.util.platform.unix.freebsd.BsdSysctlUtil.sysctl(BsdSysctlUtil.java:55)
at oshi.hardware.platform.unix.freebsd.FreeBsdGlobalMemory.(FreeBsdGlobalMemory.java:36)
at oshi.hardware.platform.unix.freebsd.FreeBsdHardwareAbstractionLayer.getMemory(FreeBsdHardwareAbstractionLayer.java:53)
at org.openhab.binding.systeminfo.model.OshiSysteminfo.(OshiSysteminfo.java:68)
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.instantiateSysteminfoLibrary(SysteminfoHandler.java:113)
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.initialize(SysteminfoHandler.java:99)
at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:741)
at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:1)
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
… 1 more
Caused by: java.lang.IllegalArgumentException: Invalid sizeof type 4
at com.sun.jna.Native.sizeof(Native Method)[197:org.openhab.binding.systeminfo:2.1.0]
at com.sun.jna.Native.(Native.java:161)[197:org.openhab.binding.systeminfo:2.1.0]
… 14 more

So it seems some arrays arent correctly initialized :confused: sad

I hope you are feeling better now!

Sorry to hear that it didn’t work, I’m afraid I wouldn’t know enough to try and diagnose that problem so hopefully the people at JNA will be able to help you soon!

Still dealing with some high fever temps but its managable.
Well atleast your effort has shown that it is indeed possible to manually replace the missing freebsd jar inside the runtime folder of OpenHAB. If somebody skilled enough would take a look at the jar im shure it could be done. Sadly nobody has answered my googlegroup request yet.