Using my fork of htop-osx…

I’ve been futzing with htop-osx in my spare time to add support for CPU temperature monitoring and fan speed… these are things I like to know when I’m using a laptop, and I figured other folks here might as well. If you use homebrew, just do: brew edit htop-osx and paste in the values from https://gist.github.com/stormerider/5804653 and then brew install htop-osx (or if you already have it installed, brew upgrade htop-osx).

Otherwise, you can clone the fork from https://github.com/stormerider/htop-osx.git and build it manually. Once you’ve done so, run htop and hit F2 to enter setup, navigate over to Available Meters, and add them to whichever column you want (left or right). I normally make htop suid anyways to be able to get full process details, so I’m not sure if that’s required to probe the SMC keys for temperature/fan speed, but it’s possible.

(Most folks will only have one fan; the newer MacBook Pros and the 27″ iMacs only do, I believe the Airs as well. Older MBPs have two, like the loaner I used when getting my MBP repaired. Some Mac Pros– the desktops pre-iMac integration– have up to 4 fans. The code currently only displays 3 of them, the 4th being the PSU fan.)

Screenshot:

Long hiatus

I know I haven’t posted here in a long while, but my health issues have kept me busy focusing on getting the day job done. I’ve been learning a lot of new technologies and playing around a lot with Amazon’s cloud offerings. My work now uses WordPress MU on AWS to host some sites, including our homepage, which has been a challenge, getting the scaling right for that technology and finding how all the plugins work with WPMU.

It reminded me that I haven’t been good about keeping my own plugins up to date. I’m going to go through and see what is still relevant; I have a feeling that most of the Widgets I made are no longer needed as WordPress has evolved and included a lot of the alterations I was making into the basic options. As I find this deprecated plugins, I’ll take down the associated pages for them (although I’ll leave the blog posts up for posterity). For plugins that are still functional (such as the WIP Manager), I think I’m going to spend a little time (not too much, but enough) making sure they’re up to date with WP 3.4 and do things the new way. The sidebar offers a lot more room to organize things so I’ll likely create a tab of my own.

You may have also noticed the site URL change. I’ve gone by “stormerider” as my online handle for many, many years, so it was only appropriate that I actually pick up the domain name. I’ve used it especially in the coding community, so I figured I would put my tech blog here. For the longest time I went by the pen name of “Alan Morgan” as well, but that is changing. I’m in the process (once I collect the money to do so, along with my wife) of changing my name to “Morgan Blackthorne”.

I have a set of technical blog posts that I intend to publish over at Romance Divas (which I am a technical administrator for). I intend on cross-posting them here, although some of them may be a bit beginner-ish for this blog. I also think that I’m going to try to take some of the lessons that I’ve learned while working at the day job and post them up here, if my work will allow me to, so that others can learn from what I’ve done and blaze their own trail in the clouds.

Lustre tip

Since I had a hard time finding this… If you’re setting up Lustre on a system with multiple interfaces, it seems to default to picking eth0. If you’re looking to route traffic over another interface instead (such as an internal network, a VPN, etc.) you’ll need to make a tweak on your MGS. In /etc/modprobe.conf (or equivalent file, depending on your distro), add:

options lnet networks=tcp(eth1)

Obviously, substitute eth1 for whatever your applicable interface is. Obviously, you’ll need to reboot for this to take effect. (There may be a way to change it without a reboot using the lctl tool, but I didn’t find one.)

Failure to make this change will result in OST mounts failing like so:

mount.lustre: mount /dev/lustre/ost1 at /opt/lustre/ost1 failed: Input/output error
Is the MGS running?

This is because, having selected eth0 as its only network ID, it refuses connections from other hosts (even though the actual daemon binds to 0.0.0.0… a little odd, but, whatever). The appropriate snipped from dmesg:

LustreError: 120-3: Refusing connection from 192.168.0.100 for [email protected]: No matching NI
LustreError: 4695:0:(socklnd_cb.c:1714:ksocknal_recv_hello()) Error -104 reading HELLO from 192.168.0.100
LustreError: 11b-b: Connection to [email protected] at host 192.168.0.100 on port 988 was reset: is it running a compatible version of Lustre and is [email protected] one of its NIDs?

Hopefully this will help solve someone else’s headaches 🙂

Lustre Quick Start Guide

So I’ve been looking into the Lustre file system for use at my work, and ran across something really annoying. They put together a Quick Start Guide, but it seems to have fallen through the cracks over at Sun. Probably due to the Sun/Oracle merger. If you go to this link:

https://www.sun.com/offers/details/820-7390.xml

You’ll get an error that you’re not authorized to log in (huh?). If you go to this link:

http://wikis.sun.com/display/BluePrints/Lustre+File+System+-+Demo+Quick+Start+Guide

You’ll see it listed as being unavailable.

I did find a copy of it online, so I’m reposting it as it’s valuable information.

Lustre File System: Demo Quick Start Guide

General Tech Update

I’ve been really bad about keeping this blog up to date, but I’m going to try to post a little bit more frequently. Originally I started it as just a place for me to post things that I was coding, but I’d like to expand that to various different tech-related things that I’m working on or working against.

One of the things that I’ve been playing with lately is the Roku. I picked up one of these (an XD model) on sale at Amazon for around $60, and it’s been great. See, a while back I looked at how much I was paying Comcast and TiVo and the headaches involved, and determined that it wasn’t worth keeping the cable subscription. With the advent of iTunes and Amazon Unbox, I don’t see any need to pay for regular cable service when I can just buy the episodes I want instead. Especially with Netflix to fill in the gaps. The Roku works perfectly with Unbox and Netflix, which are the two primary ways I get content now (I occasionally buy something via iTunes, but in general I try to avoid them– their policy to not allow redownloading is something I don’t like. Video takes up a lot of space, and I’d much rather stream it than have to deal with storing it and backing it up myself. Word on the street is that Apple is looking to change that policy, but they need buy-in from the industry, so we’ll see what happens there.)

However, I do have some local content that I like to play on the TV, and I’ve been looking at the best ways to do that. Before I used to hook up my laptop and play files that way; it worked but now the HDMI port is used by the Roku and I don’t want to deal with plugging and unplugging equipment all the time. Enter two solutions: Gabby and Plex. Both have you set up a local media server and add a channel on the Roku which streams content from the media server. Both Gabby and Plex do transcoding (I believe both use ffmpeg behind the scenes; I know Plex does) so that you can play more than the few media formats the Roku directly supports. This has been an interesting experience as neither is really stable yet. The Plex Media Server for Windows is pretty new, but seems pretty stable; Gabby’s media server has had more than a few glitches and crashes (and I can’t get it to reliably start at boot time due the way it’s implemented in .NET). The Gabby devs are also the devs behind the Gabby Roku channel, since that’s the prime focus for them, whereas the Plex channel is actually developed by someone outside of the core Plex dev team. So I’ve been using both, and liking both, but so far I’m leaning a little bit more towards the Plex camp. Especially since they just announced the availability of the Plex Media Server for Linux. I got it up and running under my dual-boot box (Win Vista / Ubuntu 11.04), but it’s not working properly with the Roku channel. Not sure if that’s a Linux server issue or a Roku channel issue, but I’m sure it’ll get sorted out in a little bit. That gives me one less reason to boot into Windows. 🙂

Speaking of that, I’ve been spending a bit more under Linux in general of late. I find it’s a lot easier on the days that I’m working from home to have a full Linux environment at my fingertips than to run countless PuTTY sessions. Maybe it’s just in my head, but that’s the way it feels to me. I upgraded to Ubuntu Natty Narwhal a while back, which has the upside of Vim 7.3. The downside is that VPN connections seem to make my entire networking stack act weird. I opened a bug on it during the beta, but it’s lingering in limbo at this point. I definitely notice a difference between that system and my laptop, which is a Win Vista / Ubuntu 10.10 dual-boot.

After seeing a presentation on it at LinuxFest NorthWest, I finally buckled down and configured BackupPC on my NAS box (which runs Ubuntu 10.10). I just used the default Ubuntu packages for it, and spent some time configuring all my various machines to work with it. On the Linux side I just use rsync over ssh, and for the Windows boxes I use rsync via DeltaCopy. (The two things I’ll mention about the latter: you need to specifically allow port 873, aka rsyncd, in Windows Firewall. You also need to enable pings in Win Vista/Win7, which can be done via the command “netsh firewall set icmpsetting 8 enable”. Otherwise, even if DeltaCopy is working and the firewall allows it through, BackupPC won’t connect to the host because it’ll think it’s offline.) I’m still fine-tuning things, but it’s backing up around 350GB or so of data for me across like 8-10 machines. I thought for a bit about how to handle my dual-booting computers, and decided to just give them different names and identities between the different OSes. So my main machine is storm under Win Vista and lightning under Ubuntu; my laptop is typhoon under Vista and whirlwind under Ubuntu. I’ll have to figure out something for my netbook once I get the partitions straightened out on that so I can dual-boot that between 7 and Ubuntu.

I’ve also been doing some coding lately, specifically on StormChat. I’ve been working on it for years, but I’ve finally gotten to the point where I have someone else running it on their servers, instead of the only people running it being the people that I maintain it for. Granted, I did install it for Ad Astra, but still… it’s the first install not sitting on my servers. I’m working through the bug list, trying to triage it a bit and get things rolling again. There’s a lot left to be done; right now I wouldn’t really recommend it for anyone that’s not very adventurous or without direct access to me to troubleshoot the things about it that only I know how to fix. I need to work on getting rid of the need for the server, fix/revamp the installer, and fix/revamp the admin console. Those are the three big-ticket items on that project.

I know that my WordPress plugins are really out of date at this point. Some people have reported that some of them still work, which is great to hear. I hope to find the time to sit down in the future and revisit each of them and determine if they need updates or if they can be retired.

I’ve also been playing around with RIFT lately; WoW just hasn’t been grabbing me lately. I tried getting it to run under Wine, but haven’t had much luck yet. If I do get it running, I’ll post how I did so.

FYI…

A month or two ago, I moved this site off of my original colocated server to a dedicated virtual private server hosted over at RackForce. I’ve got nothing to complain about with their service– far from it, in fact– but apparently the majority of the emails coming from the RackForce server were being marked by Google Mail as spam.

Not sure why, and since I de-spammed a slew of them, Google Mail is now delivering them appropriately. However this does mean that I missed a lot of comments people left on the widgets. If you were wondering why I suddenly dropped out of touch, it was mainly because I was too busy to stop and think that there was something suspicious about the lack of emails about comments on the site.

I’ve gone through and commented on a bunch of them and will try to do some further testing as I have time on how to deal with the sizing on the drop-down widgets. Apparently Firefox auto-expands to fit the size of the content and IE does not, from what people are reporting. For some widgets, people like the Firefox behavior and some people like the IE behavior.

My gut tells me that CSS can handle this were code is not the best way to approach it. However, I can (fairly easily) add in an option to truncate the text after a user-specified limit which will allow people to simulate the IE behavior in Firefox. The reverse, on the other hand, I don’t think can be done via code… but should be able to be done via styling.

I’ll post more after I run some tests over the next week or two. Between work, writing, and World of Warcraft, I’ve been rather busy lately…

Getting started…

A while back I set up a WordPress blog for my writing, which is over here.

I’ve since gotten involved with a number of plugins and figured that it would be more appropriate to launch a tech-oriented blog as well.

Thanks go to Hakan Aydin for updating the 3cbl theme with support for AutoMattic Widgets.

Now to wrap up some work on the widget plugins that I’ve made and publicize them…