Archive

Archive for March, 2008

IEI HubMax Access Control and Linux

March 31st, 2008

At the Midland Park Ambulance Corps, where I’ve been volunteering my time as an EMT and all-around tech guru for three years, we have an IEI HubMax2 access control system. Maybe overkill for us (only 78 users in it, including old codes), it’s pretty simple – a box with some microcontrollers sits in a wiring closet, and is hooked up to keypads at each door, and relays to electromechanical strikes. Type in the right code, and the door opens. Obviously, it also logs all entries as well as unknown codes (but doesn’t log the actual code if unknown, so instead of removing old users, I set their codes to an invalid timezone so the doors don’t open, but accountability is still intact). Well, the old box died – fried by a surge from a blown computer that was hooked up to its’ serial port. New one was installed this weekend – an 8 hour ordeal.

The problem with the system is that to program it, I have to grab the laptop out of one of the ambulances, have IEI’s proprietary Windows-based programming software (which programs it via sending and receiving full binary memory maps of the controllers over 1200 baud serial), and spend half an hour in the utility closet (next to the furnace) where the box is waiting for memory maps to transfer over the slow direct connection. Well, there’s a proliant server running OpenSuSE seven feet away… why not use that?

While IEI offers their eMerge systems – appliance servers that manage their access control units via a web interface – for $6000, which run RedHat, they won’t even respond to my emails inquiring whether they have Linux-based programming software for their HubMax line. We don’t get that many new members per year, so I figured just programming in a few spare codes will handle it. Removing people can wait, as people usually leave on good terms. However, every once in a while something’s amiss at the building (usually a door left ajar, or food left out), and I’m called upon to pull the logs. It’s a pain in the @$$. I have to hunker down in that utility closet with a laptop, waiting for the whole memory map to download over 1200 baud just to see who came and went. Porting the software to Linux wouldn’t be a quick project. This is even worse during the school year when I’m living in my apartment an hour away, taking classes full time, and still working 25 hours a week.

The Solution: At the end of my eight-hour install, everything was programmed and setup, but the logs were still bothering me. Then I hit on an idea. Remembering how archaic the real-world interfacing of these things seemed to me (how can you use binary memory maps? What about a serial terminal with an ASCII command set, or even Ethernet and SNMP or Telnet? I really want to build one of these things running real-time Linux…), I started to flip through the manual and, sure enough, found a command (entered on a 12-key keypad on the main board) to dump logs in realtime to a serial line printer.

I ran a cable to the Linux-based server not 10 feet away, fired up Kermit, issued the Enable Log Print code, and tried a code entry on the keypad by the front door. Bingo!

In the two days since, I have a little daemon coded in PHP (yes, PHP) that reads the serial line and dumps all log data (entries, exits, door ajar, unknown code, access denied) to both a text file (for debugging and redundancy) and into a MySQL database. Another hour of coding and I have a simple web GUI, available on any of the computers on the LAN, for officers to check who’s come, and who tried to get in but couldn’t.

I’ve never written a daemon before, so I still have a bit more research to do – mainly in terms of error handling and how to keep it constantly running. However, I have a first version working.

In the next few days I’ll start posting better code for ieilogd. I have some in CVS now, but it’s kludgey (well, it was written through PuTTY on a Windows laptop in a utility closet at 3 AM). It also has quite a bit of user-handling code that’s specific to the roster format of my package PHP EMS Tools.

Projects, Tech HowTos , , , ,

Interesting Links for 2008-03-27

March 28th, 2008

Interesting Links for 2008-03-26

March 27th, 2008

Rutgers Student Linux Group and Sun

March 26th, 2008

The next week will be quite busy. For one, I’m going to attempt an OpenSolaris operating system installation on my Asus eeePC. Last I heard, there were some compatibility issues – though this was my first attempt at running the Solaris operating system on a laptop, and it took quite an effort to get my favorite mainstream Linux distro installed on the eeePC, though I’ve been running that on laptops for 6+ years.

This Sunday, March 30th, the Rutgers University Student Linux Users’ Group (RUSLUG) will be hosting our annual Installfest in the EIT Lab from 10 AM until 6 PM. While the event is generally marketed towards Linux newbies, it’s usually attended by a diverse range of students (and staff) from first-timers to Solaris sysadmins. I’ll be attendance, as always, and will also be conducting some demos of new Sun technology (mainly OpenSolaris and NetBeans). For anyone in the New Brunswick/Pisctaway area, I’ll also be armed with some door prizes and a whole plethora of CDs and DVDs. For anyone interested, I’ll be providing information and pointers on NetBeans and Solaris, as well as installation assistance (and maybe some prizes) for anyone looking to give OpenSolaris a whirl on their system.

Following up the Installfest, on Tuesday, April 1st at 9 PM (also in the EIT lab) will be the RUSLUG Newbie Night. It’s generally a fun-filled evening with Ubuntu LiveCDs and a general Q&A session about Linux. Generally this includes one-on-one assistance for new Linux users. In an effort to raise the level of content (and provide a diversion for more experienced users if there aren’t many new faces), I’ll be once again demo’ing some Sun technology, and specifically providing an overview of my recently completed personal mailserver migration from SuSE Linux to OpenSolaris. Once again, visitors can expect some door prizes and lots of fun CDs to take home.

In other RUSLUG news:

  • It looks like I’ll be running to become an officer next year. Anyone else at Rutgers can feel free to contact me with ideas, etc.
  • RUSLUG’s current box, ruslug.rutgers.edu, is a Dell desktop thrown on a shelf in a closet. I’d like to find someone willing to help out with procuring a new box. It doesn’t need to be anything fancy – just pretty simple, though I’d like to look into high capacity storage for mirroring distros. FYI, the current box is a Dell desktop with a 1.7GHz P-4 (256KB cache), 512 MB RAM, and about 250GB of IDE storage (150GB + 100GB, no RAID). We don’t need a big upgrade in processor power, but more RAM and RAID for the system and user disks would be nice (distro mirrors can be a big IDE/SATA or an external disk).

Higher Education , ,

Interesting Links for 2008-03-25

March 26th, 2008

Interesting Links and Resources

Where have I gone?

March 25th, 2008

Well, it’s been a while since I posted. Things have been horribly busy in the school world, and I have some new projects I’m working on as well. Unfortunately, due to limited resources at the moment, I haven’t been able to give Zenoss a try. If I eventually find a nice 25-30U rack for the hardware running JasonAntman.com (in the basement of my suburban home, so headroom is limited to about six feet), I’ll probably move one or two machines from my apartment back there, reorganize things, and setup a Zenoss test (*if* I can get Xen to play well with some OS that has Zenoss RPMs, or give up and compile from source).
A few of my new projects:

  • Some embedded Linux work
  • Getting my new Deluo USB WAAS GPS working with my eeePC, and eventually add software for mapping wireless networks
  • Mount an external 2.4GHz antenna on my truck, so I can hop on RUwireless without leaving the comfort of my home on wheels.
  • Get a “N” wireless card and beta the wireless-N at Rutgers.
  • Figure out development for PalmOS, and write a program to sync my Palm calendar with Google Calendar over-the-air.
  • Do some work with a radio scanner and a system at home for recording and logging (maybe even MDC1200 decoding).

My pet peeve for the day – blogs and other websites that don’t list a date last updated. I’ve been looking around for alternatives to KPilot, and I have to look through all of the Google results, and figure out how old they are based on version numbers and which Palm devices are listed.

And, from Rutgers Telecommunications, this is what RUwireless looked like over spring break, and the Monday that everyone came back:

Rutgers daily traffic graph of sr02-hill012-svcs_vlan1000 on 2008-03-25

Personal, Projects , , , , , ,

Flash – Why do you have to be the way you are?

March 13th, 2008

Just a little comment. I’m usually not one to click on ads, but when I saw a banner ad for a NEC projector with 3000 ANSI lumens for under $1000 USD, I just had to take a look.

The NEC product page has a nice little sidebar to “Check out how NEC displays are being used by businesses”. Hoping that they might say something about displaying the output of an NMS, I decided to go for a look. Now, a little note about my browsing habits. I use Firefox, and have since it came out. I can’t use anything else – after all, I need my two dozen add-ons. Like any good Firefox user, I use tabs. At the moment, I have about a dozen open. Sometimes I have three times that (and I’ve never found problems with that. Try it in IE, I dare you). (Side note – I don’t understand how IE can still have market share, but not have an add-on facility like Firefox. Then again, they’re 3 years behind in almost all features…).

So, I unsuspectingly right-click on the link to “Learn More”, hoping for a nice right-click context menu. What do I get? A Flash menu. I Ctrl-click, and get the page I wanted – in the same window.

First of all, it’s not animated, there’s no reason why they need Flash to do what can be done with a simple image. Just another thing I hate about wed design – the use of “advanced” technologies (read: non-interoperable) when they’re not needed. But more importantly, respect your users’ browsing habits. The right-click menu has a purpose. And if your users want to open a link in a new tab/window, let them.

On the converse side of things, why doesn’t Macromedia get their act together and make flash into a technology that follows the functionality of the rest of the web? Surely right-clicking on a link wouldn’t be that hard to implement…

Ideas and Rants

Backups of data in the ether

March 6th, 2008

While I’ve often told mystified people that hosted services – the free ones – aren’t required to backup your data, and you should probably do it yourself, I usually didn’t worry about this very much – all of my web apps are on my own boxes, as well as my email. However, out of curiosity, I spent about 15 minutes the other day coding up a little hack of a PHP script to keep track of what applications I use a lot (specifically web-based ones that I can’t easily have my OS keep track of). After a day of trying to click the little “update” boxes on a simple page when I used something, I realized how much of my data is actually out of my own control. Maybe not anything critical, but convenience stuff like Google Reader, del.icio.us for *all* of my bookmarks, and occasionally Google Docs when I’m going to be hopping from place to place, or may be using a machine that I don’t trust to SFTP something back home.

So, I decided to go about backing up some of this. The solution I aimed for was simple – a BASH script that runs nightly via cron, and dumps the data into my home directory on my main storage/backup server.

Google Reader seemed to be one of the most difficult – no easy URL scheme, but I found a simple script that makes use of Perl CPAN’s WebService::Google::Reader module to grab a complete feed list. After seemingly an hour of CPAN updates and dependencies scrolling down my screen,

Google Calendar Backup:
Wonderfully simple. Go into Settings, copy the URLs to the private calendar links (I used iCal format), and wget them.

del.icio.us backup:

curl --user usernam:pass -o myDelicious.xml -O 'https://api.del.icio.us/v1/posts/all'

Google Reader Backup:
Still in the works – Perl problems on my backup machine.

Google Docs Backup:
Hopefully soon, though nothing important lives there.

Tech HowTos , , , ,

Cable Management, Power Measurements, Major Outage, Cacti

March 6th, 2008

So, once again, still really busy. But a few new things.

First, my racks both at home and at the apartment are atrocious. They have no cable management at all. Both started with 1-3 machines, and no real plans for upgrades (since they’re just my personal/development machines). Unfortunately, the “rack” (a metal workshop shelving unit) at home now has 8 machines and a host of ancillary equipment. The one at the apartment – an actual 42U rack – has 5 plus a few switches, rackmount KMM, etc. They’re both a jumble of wires in the back. Unfortunately, it seems like cable management hardware is *epxensive*. $30 for a 2U metal blank with a few plastic split D-rings, or almost $40 for a 2-meter vertical hunk of plastic channel with slits in the sides? So, I’ve been vaguely considering what it will take to fabricate some cable management hardware of my own. Probably just building something out of rack blanks for the horizontal off of the switches, and buying some sort of vertical channel for power and networking/KVM. Man, those KVM cables sure do take up a lot of space. Also at the moment, at home my power is all coming directly out of two UPSs, whereas at the apartment it’s straight from mains off of a surge suppressor. I’s like to buy another UPS for the apartment from RefurbUPS.com, where I got the ones from home, and also add a PDU at home and a vertical power strip at the apartment.

Also, at the apartment, the roommates and I have had some discussion lately about how much power the machines draw. This mainly stemmed from our plans to move this June, into a rented house with two more people. This seems to be falling through, so I don’t have to worry about moving and re-cabling everything, but I’m still interested in finding out how much power is being drawn. Granted, my UPSs at home give me a more-or-less good idea of power consumption, but I’d like to know in detail. The ideal solution would be a clamp ammeter around the mains line to the equipment – one with a serial interface. Unfortunately, I can’t seem to find such a thing, short of a digital multimeter left on all the time. So, I guess I’ll be looking around, and if I can’t find anything specific, maybe I’ll work on a microcontroller that can read 1-200mV in 1mV increments, and use it with an inductive clamp ammeter (usual output for them is 1mV per A).

So, on Monday I got into work and couldn’t access my mailserver. Weird. I never even got any Nagios alerts. I checked Nagios and… nothing. As in no connection. I SSH’d home and pinged both boxes, but nothing. The switch showed the mail server totally offline, and the Nagios box plugged connected but ZERO data out. I reset the counters and waited. Still nothing. After an hour or so of poking around, I determined that both devices were on the same 6-port group on the switch, and nothing else there was up too. So, after five long hours, I got someone back home to switch the cables. Still nothing. On a hunch, I asked to have her check the mail server (the “new” Sun Blade 150) and, sure enough, it wasn’t powered on. A click of the power button, and the mail server was back online. Along with an ominous last email from Nagios, stating that the UPS running my switch lost power, and 6 minutes later, was going down hard. Then quiet.

I don’t usually have power outages. So I’ll admit, when I added some of the new machines, I committed a high sin – I “never got around” to setting up everything power-wise. I also have the switch running off of an old BackUPS 500VA unit, USB, without automatic self-tests. As a result of all this:

  1. The little UPS powering the switch only held out for 6-7 minutes. As a result, once that died, the bigger units didn’t even matter, as all hope was lost. This needs to be on a bigger UPS – maybe one of the 1000VA’s until it gets its’ own.
  2. APCupsd requires a network to initiate shutdown, so the rest of the machines came down hard (as confirmed by looking through log files).
  3. The SunBlade was never setup to power on after power interruption, so it just sat there like a brick.

Most disturbingly, while my Nagios/monitoring box is up (according to the switch, power draw figures from the UPS, and the lights, as confirmed by someone on-site), it’s dead. No ping, nothing out. I’ll have to look into it, but it made me realize that this really is my only way of analyzing problems. That needs to stop.

Maybe one day I’ll have the money for a nice SmartUPS RT or even a Symmetra – though getting 208V into my basement is even more of a dream than spending $4000 on a UPS.

Also, I decided (after all this) to setup graphing of UPS data (load, voltage in and out, temp, capacity, run time, etc.). While I haven’t gotten around to setting up Zenoss yet, I did a quick (well, 4 hours later I’m done configuring it) Cacti installation on my web server (I should already have it running on the monitoring box, but who knows what that will look like when I get home). I also dropped a Cacti host template in CVS for the AP9605 PowerNet SNMP card in my UPSs.

Projects , , , , , , , ,