Printf

While browsing thru some old directories I ran across the following file, which seemed fitting given Dennis Ritchie’s recent death. It’s a welcome message displayed to all users when they first logged into Software Tool & Die’s public access unix machine called world.std.com.

From uunet!research.att.com!dmr  Tue Oct 17 03:35:50 1989
Return-Path: <uunet!research.att.com!dmr>
Received: from uunet.UUCP by world.std.com (4.0/SMI-4.0)
	id AA27107; Tue, 17 Oct 89 03:35:50 EDT
From: uunet!research.att.com!dmr
Received: from inet.att.com by uunet.uu.net (5.61/1.14) with SMTP
	id AA15993; Tue, 17 Oct 89 03:21:50 -0400
Message-Id: <8910170721.AA15993@uunet.uu.net>
Date: Tue, 17 Oct 89 03:15:37 EDT
To: msgs@world.std.com
Subject: printf

	"Hello, world.std.com!\n"

		Dennis Ritchie

I got an account on The World in the early 1990’s and remember seeing this message and being amused and wondering if it was real. It is really from Dennis Ritchie, as confirmed in The World’s founder Barry Shein‘s euloblog for Ritchie.

The thing I notice now about the message is that it took 20 minutes to travel from New Jersey to Boston! Ahh, back in the UUCP days

Sites Refreshed, Crawlbars Eliminated

I’ve refreshed both this blog and Habilis. They now sport Responsive CSS designs, so no matter what device you view them on, you will never see the dreaded crawlbar.

Extechops has switched from the rather narrow and abandoned Day Dream theme to the more comfortable and up-to-date Twenty Ten theme. A modified version of Todd Halfpenny’s Responsive TwentyTen plugin provides a responsive layout.

Habilis.net has had an iPhone style sheet for a while, but now a general-purpose responsive style sheet spans a range of 20 to 82 em on any device. I’m particularly proud of the responsive table-wrapping mechanism on the AppDNA page. For wide-screens, an experimental 2 CSS-column layout is activated on WebKit/Mozilla-based browers via Modernizr.

One advantage of having a site designed in 1999 is that it is unintentionally future-proof. The average screen in 1999 was roughly the size of a iPad screen today – so Habilis.net displays perfectly with only minor adjustments. Thank goodness, I never fell for those 3-column fad designs so popular in the aughts!

Last hit from Google China

Google has closed its search engine in China in a dispute over hacking and censorship. As an English/Japanese site, habilis.net has never seen much traffic from Google China, so the last hit was in early March. Someone in Beijing searched for “mac os lynx“:

221.x.x.x - - [09/Mar/2010:09:18:29 -0800] "GET /lynxlet/ HTTP/1.1" 200 3355 "http://www.google.cn/search?hl=zh-CN&source=hp&q=mac+os+lynx&btnG=Google+%E6%90%9C%E7%B4%A2&aq=f&oq=" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; zh-CN; rv:1.9.2) Gecko/20100115 Firefox/3.6"

Ironically, the second to last hit from Google China was using Google’s own Chrome browser, but it is likely a foreigner because the browser is using English:

121.x.x.x - - [24/Feb/2010:07:38:36 -0800] "GET /validator-sac/ HTTP/1.1" 200 3137 "http://www.google.cn/search?sourceid=chrome&ie=UTF-8&q=validator-sac" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.1 (KHTML, like Gecko) Chrome/5.0.322.2 Safari/533.1"

Cron Tip: Reboot Jobs

If you have an account at a managed hosting service (shared hosting, VPS, etc), system reboots can be unexpected and confusing events. Sysadmins need to reboot for a variety of reasons — hardware problems, security patches, vandalism — and they rarely inform users before or even after the reboot. All you might see are some confusing messages in your error logs, or gaps in the traffic logs.

One solution is to setup a reboot job in your cron table, like this:

@reboot         echo 'Uh oh, a Reboot!'

Now, every time the system is rebooted you will get an email, and you will be better able to interpret or fix any problems that show up.

One caveat is that @reboot jobs are run whenever the cron daemon starts, so false positives are possible. However, in practice the cron daemon is almost never restarted on its own.

Over One Billion JSessionID’s Served!

The 2006 RandomCoder article, “JSESSIONID considered harmful” mentions that a Google search on URLs with “jsessionid” in them resulted in 76 million results. Now in 2010, there are over one billion pages with “jsessionid” in the URL!

Although I understand the motivation behind URL-based session-ids (support cookie-less users), it seems inconceivable that all billion of these pages actually need cross-page state, even for casual/anonymous visitors (including search engine robots). I wonder how much bandwidth, memory and processing power are wasted to create empty session objects and shuffling around useless JSessionIDs in URLs and cookies.

Strange Error Log Hits

If you monitor your website error log, you often see strange events. For example, I saw three near-simultaneous hits to an incorrect URL from three different continents! One hit each from Fort Mitchell (Kentucky, USA), Seoul (South Korea), and Jiddah (Saudi Arabia).

[Thu Jan 01 11:27:16 2009] [error] [client 67.201.111.13] File does not exist: /habilis.net/chucHTTP
[Thu Jan 01 11:27:22 2009] [error] [client 125.243.141.130] File does not exist: /habilis.net/chucHTTP
[Thu Jan 01 11:27:23 2009] [error] [client 212.62.97.23] File does not exist: /habilis.net/chucHTTP

Why? And where did the broken path “chucHTTP” come from? It makes one worry about international conspiracies, but it is probably just a poorly coded botnet harvester.

Cron Tip: Monthly Crontab Reminders

Cron jobs are great, but it is very easy to forget what jobs are running, especially if you’re administering multiple cron tables on different servers. The solution is to add a crontab reminder job at the top of every cron table, which emails a listing of the cron table every month:

@monthly        : Crontab Reminder ; crontab -l

The colon is the no-op command, whose arguments describe the job for the email subject line. The ‘crontab -l’ lists the cron table for the current user. Cron displays the user and host on the subject line, so you will know which account is listed.

Subject: Cron <chuck@doublebrain> : Crontab Reminder ...

Now, every month you’ll get a reminder email about what jobs are running under each account. This will also serve as a monthly test of the accounts email settings.