Category Archives: Tech

Tech

Killing Zombies

Occasionally, on our cluster, a node will crash. If a job was running on it that spanned multiple nodes, sometimes the other nodes won’t get the message that their fellow has crashed, and they will just keep running whatever processes are on them.

I call these “Zombie” processes, because they just lumber along eating CPU time and rotting, keeping other jobs from using the node. Today, after noticing a particularly bad zombie infestation, I finally created a script that checks for zombified machines and then restarts them. This script is compatible with Torque and relies on Scyld Beowulf “b-commands” and IPMI, but you could easily replace them with similar utilities like rsh or ssh.


#!/bin/bash
# For all of the nodes in the main cluster...
for NODE in `seq 0 119`; do
     # Calculate the load and convert it to an integer
     LOAD=`bpsh $NODE uptime | awk '{ print $11 }' | sed "s/\,//"`
     LOAD=`printf %1.0f $LOAD`
     # Figure out whether the node should be running anything
     ASSIGNED=`qstat -f | grep $NODE | wc -l`
     if [ $ASSIGNED -gt 0 ]; then
          ASSIGNED=1
     fi
     # If the node is running something but shouldn't be, reboot it.
     if [ $LOAD -gt 1 ] && [ $ASSIGNED -eq 0 ]; then
          echo Node $NODE is a zombie! Kicking. >> /root/logs/zombies.log
          # This relies on IPMI
          ipmitool -H 10.54.2.$(( 100 + $NODE )) -U (some user) -P (some password) power reset
     fi
done

You can download the file directly: Zombie Checker

(Here’s another post on Zombies).

ECG (or EKG for the Germans) Learning Tools

Clinical Cases and Images has a nice post up with a set of links to and explanations of various ECG/EKG learning tools. They are introduced as follows:

To provide some background, I am a teaching attending at Cleveland Clinic and have multiple rotations during the year with our residents and medical students. We record all topics discussed during a particular rotation on this blog and I know from the feedback which one the residents and students like the best. This month it was the session about using 2 mnemonics as a systematic approach to interpreting EKGs and web-based tools for EKG training.

GTD Tip: Finder’s Column View

For the Mac users among you, here’s something I’ve been doing the last few months that you might find useful.

When you get to the following part of your weekly review (which you are doing, aren’t you?):

Review “Pending” and Support Files
Browse through all work-in-progress support material to trigger new actions, completions, and waiting-fors.

try using the column view in Finder to go through your digital files. This assumes that you have some or most of your project support materials in digital form. Here’s my project view (click thumbnails for full size):

threecol

As you click through the list, it’s easy to delve into the sub-directories but keep track of where you are:

threecol_2

Do you have any weekly review tricks?

Fun With Spam

A friend of mine from my undergrad days at Tulane decided to have some fun with subject lines from SPAM in his Inbox. He assigned each subject line to an appropriate celebrity/persona. Here’s an example:

Oscar Meyer: “What you need is an award winning wiener.”

Seems like a fun game! The whole post is here. Here are a few I came up with from my Junk folder:

  • Ted Haggard: A pastor from FloridaColorado calls parishoners to have sex every day.
  • Lawrence Fishburne: Want to act like a pornstar? Take a bluepill!
  • Christopher Reeve: Become a super-man!
  • He-Man: Be the master of the universe, with a huge broadsword in your pants?

What can you come up with? (Also, better suggestions of celebrities/characters for the lines above are welcome.)

About Mozilla

Despite using the Mozilla browser and its descendants for eight years (or so), I never knew about this. It was brought to my attention in a roundabout way by this (possibly NSFW) LiveJournal post and subsequent comment thread.

As always, Wikipedia has more details.