Memory stick weirdness

This is strange, but I’ve mentioned problems with Memory Sticks and Linux before. When I plug my camera into my PC /var/log/messages sometimes reports errors reading the camera memory:

Sep 16 11:22:52 donncha kernel: hub.c: new USB device 00:07.2-2, assigned address 13
Sep 16 11:22:55 donncha /etc/hotplug/usb.agent: Setup usb-storage for USB product 54c/10/440
Sep 16 11:22:56 donncha kernel: Device not ready. Make sure there is a disc in the drive.
Sep 16 11:22:56 donncha kernel: sda : READ CAPACITY failed.
Sep 16 11:22:56 donncha kernel: sda : status = 1, message = 00, host = 0, driver = 08
Sep 16 11:22:56 donncha kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
Sep 16 11:22:56 donncha kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
Sep 16 11:22:56 donncha kernel: sda: I/O error: dev 08:00, sector 0
Sep 16 11:22:56 donncha kernel: I/O error: dev 08:00, sector 0
Sep 16 11:22:56 donncha kernel: unable to read partition table
Sep 16 11:22:57 donncha devlabel: devlabel service started/restarted

and similar problems have been reported elsewhere!
As you can see, it looks like the camera has been detected on /dev/sda.
For no better reason than “what if?” I tried /dev/sdb instead, and surprise, it worked!
Really strange..

Graphs are a good thing

kasia posted about using mrtg which got me thinking about using it as well. It comes installed with Red Hat 9 (and I’m sure earlier) so it’s on all our servers.
apt-get install mrtg was easy.
Copying her script and configuration over was a sinch too. Just put it into /etc/mrtg/
Then I managed to get the linux_stats.pl script working with the aid of this email.
Finally, I managed to record stats about Apache using the script here and with help from here. The killer was trying to debug why the Perl script wasn’t working. It took me a while to figure out I should have the ?auto at the end of the server-status url. bah!
I’m going to try MySQL next!

Book Recommendations

Here’s a few of the books I’ve read over the past Summer. These are “un-put-downable” and I stayed up many a late night reading for as long as possible.

  • High Society by Ben Elton. This was the first book I read by Ben Elton. It’s about the drug society in the UK. Great read, and terrible what happens to some people affected by drugs.
  • Emporer – The Gates of Rome by Conn Iggulden. Just glancing over the reviews on Amazon this book is controversial! It might not be 100% historically accurate but the author states that at the end of the book. Here’s a video interview with the author. I haven’t looked at it yet.
  • Life Of Pi by Yann Martel. I was not expecting the story that unfolded when I started reading this. This book was recommended by a friend and and I’m passing on the same recommendation!
  • Kitchen Confidential: Adventures in the Culinary Underbelly by Anthony Bourdain. I’m not sure why I picked up this book in Waterstones last year but I’m glad I did. I don’t usually read non-fiction or biographies but this is a great read! I just wish I had called to the restaurant he works in now in New York, but we didn’t have the time.

If you're in London tonight, bring your laser pointer..

The Fark.com Flash Mob will “Laser-Pointer David Blaine” tonight at 9pm. Be there at 8:45pm to “scope the place out and choose a good spot.”
Thanks NTK for the heads up, “if anyone actually makes the effort, they should be able to light him up like the Blackpool illuminations.”
hehe.

NTK will also have a stall at the Back in Time Live 4, described as, “A mammoth weekend of C64 fun, the biggest 8-bit rock concert ever held, and a great retro-music-game-exhibition.” Yes, I’d like to be there.

Sneaky, sneaky ..

While investigating errors in my php_errors log file yesterday I stumbled across someone leaching data from one of our sites. I blocked him with a .htaccess entry but by the time I left work yesterday they hadn’t noticed that their application wasn’t working.
I came into work this morning and saw that the requests had stopped. Good! Then I grepped for libwww-perl and was disappointed to see requests going to our main server for the same data. A .htaccess file stopped that too but it’s tiresome.
I should check referers but that’s not guaranteed to work and that method actually bit us hard a few years back when a partner couldn’t access data from their site. 🙁
Are there any apps out there for detecting this sort of thing from the log files? I’m guessing that a statistical analysis of the logs would show up lots of the same or similar requests over a short period and/or repeated on a regular basis.
Anyway, thank you 66.33.193.57 for adding one more job to my list of things to do. I’ve already mailed abuse at your ISP. They may be in touch soon.