Hack and / - Temper Temper
If loving Linux ever became a crime and I were hauled into court, I think the prosecution's argument would go something like this:
Your honor, I need to submit only two pieces of evidence to make my case. First, I present Exhibit A: a stack of Linux Journal magazines of which the defendant is a columnist.
And your second piece of evidence?
Your honor, the defendant's refrigerator is powered by Linux.
(The audience gasps.) Order! I've heard enough! Guilty!
I can't help it. I mean, why wouldn't you power your fridge with Linux if you had the chance? In my case, we recently purchased a new fridge for our house, which meant our spare fridge was headed for the garage where I would use it for beer fermentation. Fridges are well-insulated, and it seemed ideal for the task at hand, but the problem I ran into was that the built-in thermostat for the fridge would go up to only around 45–50°F at its warmest. To ferment ales, I needed to maintain temperatures between 60–72°F.
When most people convert fridges to ferment beer, they purchase a purpose-built device from their local brew shop. Essentially, you plug your fridge in to the device, plug the device in to the wall, and then set the analog thermostat on the device to your desired temperature. A temperature probe goes into your fridge, and when it gets too warm, the fridge is powered on. These devices range from around $70 to more than $100, depending on whether they are analog or digital, and I almost bought one until I realized I could do the same thing with an old Linux laptop, a couple pieces of hardware and a few scripts.
If you are into home automation at all, you are familiar with the X10 suite of home automation gadgets. Essentially, you can connect lamps and appliances to different X10 gadgets and then power them on with a remote control. There's even a remote control that connects to a serial port, so you can control everything from a computer. Linux has a program called bottlerocket that works great with X10 serial port controllers, and I had used one to control my DSL modem for many years, but that's something for another column.
So, I had a laptop and could control the fridge power, but I still needed a thermometer that worked under Linux and was relatively cheap. I discovered a great little USB-powered thermometer made by a company named TEMPer. It's small, cheap (less than $15 shipped), supports temperatures between –40°C and +120°C, and with a little effort, it works under Linux. It turns out many Linux administrators are using these devices to monitor temperatures in their data centers.
Apparently, the older versions of this thermometer showed up as a USB-to-serial interface; however, the newer models, including the one I bought, show up as a USB Human Interface Device when you plug it in:
Apr 16 14:44:33 muriel kernel: [11601.992205] usb 1-1: ↪new low speed USB device using uhci_hcd and address 2 Apr 16 14:44:33 muriel kernel: [11602.182910] usb 1-1: ↪configuration #1 chosen from 1 choice Apr 16 14:44:33 muriel kernel: [11602.188481] usb 1-1: ↪New USB device found, idVendor=1130, idProduct=660c Apr 16 14:44:33 muriel kernel: [11602.188529] usb 1-1: ↪New USB device strings: Mfr=0, Product=2, SerialNumber=0 Apr 16 14:44:33 muriel kernel: [11602.188563] usb 1-1: ↪Product: PCsensor Temper Apr 16 14:44:35 muriel kernel: [11604.090148] usbcore: ↪registered new interface driver hiddev Apr 16 14:44:35 muriel kernel: [11604.119323] input: ↪PCsensor Temper as /class/input/input7 Apr 16 14:44:35 muriel kernel: [11604.140885] input,hidraw0: ↪USB HID v1.10 Keyboard [ PCsensor Temper] ↪on usb-0000:00:07.2-1 Apr 16 14:44:35 muriel kernel: [11604.170151] input: ↪PCsensor Temper as /class/input/input8 Apr 16 14:44:35 muriel kernel: [11604.188677] input,hidraw1: ↪USB HID v1.10 Device [ PCsensor Temper] ↪on usb-0000:00:07.2-1 Apr 16 14:44:35 muriel kernel: [11604.188931] usbcore: ↪registered new interface driver usbhid Apr 16 14:44:35 muriel kernel: [11604.188980] usbhid: ↪v2.6:USB HID core driver
At first I thought I could get the temperature from this thermometer through some /proc or /sys interface, but unfortunately, the thermometer is more proprietary than that. The Linux community is resourceful though, and a quick search turned up a number of guides on how to pull the temperature from Linux (see Resources for the most helpful guide I found). Essentially, you need to install a few custom Perl modules, including a special one created just for this device that depends on Perl 5.10, so you need a relatively new distribution for this to work (I used the latest stable Debian release).
Kyle Rankin is a systems architect; and the author of DevOps Troubleshooting, The Official Ubuntu Server Book, Knoppix Hacks, Knoppix Pocket Reference, Linux Multimedia Hacks, and Ubuntu Hacks.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- Weechat, Irssi's Little Brother
- New Products
- Developer Poll
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?





17 min 35 sec ago
1 hour 2 min ago
1 hour 13 min ago
1 hour 18 min ago
3 hours 28 min ago
3 hours 29 min ago
4 hours 14 min ago
5 hours 2 min ago
5 hours 26 min ago
7 hours 3 min ago