Showing posts with label JMX. Show all posts
Showing posts with label JMX. Show all posts

Friday, January 15, 2010

jukebox-jmx presentation

External forces made me put together a short introduction to jukebox-jmx - below. Please remember that this is not a tutorial, but an introduction. If you do need a tutorial, The "Comments" link is right there, below this post.



UPDATE: Permissions fixed.

Wednesday, November 11, 2009

DZ3 Instrumentation Release: What's In, What's Not

Any large working system has inevitably evolved from a small working system.

-- Source lost in time

WHAT'S IN
  • 1-Wire Sensors. Temperature and humidity for now;
  • Shell Sensor. If you can extract information from your hardware via shell script, this is what you use to make it available to DZ;
  • Thermostat;
  • Zone Controller;
  • HVAC Unit abstraction;
  • Damper Controller for bang-bang dampers;
  • Damper Controller for modulating dampers;
  • Complete data logging for every measurement point in between, including hysteresis and PID controllers inside of thermostat;
  • JMX instrumentation (quite comprehensive) and control (limited for now).
WHAT'S NOT

Unfortunately, some essential stuff -
  • Servo controller integration;
  • HVAC Unit driver;
  • GUI;
  • Scheduler
And some not so essential -
  • DAC & Core talking over TCP;
  • Obviously, sensor discovery over LAN;
  • xAP, xPL loggers (try, they most probably work, but I haven't checked).
Reason for this is that I wanted to clean up issues accumulated over years, and make sure that the system is completely transparent, can be monitored, and bugs can be seen visually (and most of them are). So the net result of this effort, so far, is a working stable system with no actual outputs (other than data loggers). You can watch it, but you can't touch it.

SO HOW IS IT USEFUL?

Well, if you've never had DZ installed because it was too complex to install and configure, the day of Instrumentation Release is your lucky day. What is already done is a turnkey acceptance of all the sensor network with no configuration beyond 1-Wire adapter port name necessary. Hang the sensors on the wall, start DZ3 and watch your house's thermal behavior in gory details.

If you do already have some variant of DZ installed and connected to actuators, then hold off for a short while, the good stuff is coming.

WHAT'S NEXT?

Exactly what is missing from this release:
  • Servo controller integration;
  • HVAC Unit driver;
  • JMX instrumentation allowing to actually control the thermostat setpoints.
GUI and scheduler ports are still on a back burner for now, the priority is a stable and working system, not a nice looking system.

UPDATE: released.

Sunday, November 1, 2009

DZ3: JMX Instrumentation and Control

If you update the DZ runner shell script to its current form (just add -Dcom.sun.management.jmxremote to Java command line), you can use JConsole to monitor and control DZ3. This is what it looks like (click to enlarge):

DZ3 JMX

And this is how to make it happen (see previous examples for context):

<!-- JMX configuration -->
<bean id="jmx-wrapper" class="net.sf.jukebox.jmx.JmxWrapper">
<constructor-arg index="0" type="java.util.Set">
<set>
<ref bean="temperature_sensor-6EE055000000"/>
<ref bean="temperature_sensor-cpu1"/>
<ref bean="temperature_sensor-cpu2"/>
<ref bean="temperature_sensor-mobo"/>
<ref bean="temperature_sensor-sda"/>
<ref bean="temperature_sensor-sdb"/>

<ref bean="rrdlogger_sensors"/>
<ref bean="rrdlogger_thermostats"/>
<ref bean="rrdlogger_dampers"/>
</set>
</constructor-arg>
</bean>

Not all entities are JMX enabled at this time. Adding one to the configuration won't do any harm, but you'll get a warning message in the log.

It's worth mentioning that you need to add DZ3 classes to JConsole's classpath in order to get complex entities like DataSample<Double> rendered by JConsole, like this:
${JAVA_HOME}/bin/jconsole \
-J-Djava.class.path=${JAVA_HOME}/lib/jconsole.jar:\
${JAVA_HOME}/lib/tools.jar:$CLASSPATH
where CLASSPATH is the same that is used in DZ3 Runner.

Sunday, January 25, 2009

Backward incompatible change: DZ will become JDK 1.6+ only

Jukebox, the platform DZ is built on top of, is currently undergoing a code review and enhancement process. One side effect of advanced JMX uplift is that the new Jukebox will be incompatible with JDK 1.5.

Whereas JMX is probably *the* cause to upgrade from JDK 1.5 to 1.6 (latter is the first version where it is really usable), the source code compatibility of JMX features is broken.

The improvement is so significant that I'm willing to restrict DZ to 1.6 as soon as new Jukebox is pulled in.

Speak up if you care.