Prefetch Technologies // Keeping your cache lines cozy

Archive

Posts from 2005

DNS domain expiration checker

developmentDec 11, 2005 1 min read

I just released version 1.0 of domain-check. domain-check queries WHOIS data and prints domain expiration dates, and works very similar to ssl-cert-check. Since seeing is believing, I will provide several examples to show just what domain-check can do. The first example shows how domain-check can be used to print the expiration date for the domain prefetch.net: The next example show how domain-check can be used to print the expiration date for the domains listed in the file "domains": And the final example shows how domain-check can be used to e-mail in 60-days or less: Send me an E-mail if you have comments or suggestions.

$ read more →

Stripping leading zeros with bash

shellDec 11, 2005 1 min

I needed to strip leading zeros from a variable, and found the "#" modifier in the shell manual pages: The number of occurences of the value following the # indicates how many to strip, and can also be applied to ASCII characters: This is some nifty stuff!

$ read more →

Finding memory leaks with OS X

macosDec 9, 2005 1 min

The UNIX standard library provides the malloc() and free() routines to dynamically allocate and free memory. These routines allow developers to increase and decrease memory (the programs heap) as needed, which allows the process to increase or decrease memory consumption as demand increases or decreases. This works great when care is taken to free memory that is no longer needed, but issues (e.g., memory leaks) can occur if memory is allocated and never free()'ed. If you are using OS X, you can use the leaks(1) command to check a program or process for memory leaks: I digs me some OS X!

$ read more →

Saving CPP processed files

solarisDec 3, 2005 1 min

My friend Clay sent me a cool tip this week. If you would like to save files that have been processed with cpp, you can set the CFLAGS "-save-temps" option: This will cause a bunch of .i files to be created, which can simplify the process of figuring out how applications work (going macro hunting is no fun at all!).

$ read more →

Viewing HTTP requests with DTrace Apache Top

dtraceNov 30, 2005 1 min

I worked with my friend Clay last night to add POSIX signal handlers and additional fields to the DTrace apachetop Perl script: This version more closely resembles the awesome apachetop C program, but uses mod_dtrace instead of FAM and the Apache access_log to retrieve request data. Hope folks find this useful!

$ read more →