I recently purchased a Unifi UVC-G3 network camera for the outside of my house. It works great in standalone mode, but has no recording capability without a Unifi NVR. The Ubiquiti hardware one is about $350, but a lot of people just repurpose a small linux box to do the job. That, to me, seemed silly since I have a Mac Mini that serves as my home media server, and runs my weather station (and a few other things). I also have a Raspberry Pi in the garage that runs Cacti (for network monitoring), and the Unifi wireless controller. This all got me thinking, “wait, I could just run the free version of VMWare ESXi (vSphere) and virtualize all of this on the Mac Mini”. The problem was, was that really possible? I know Apple allows virtualization of it’s OS on Apple hardware, and there are hacks to get it to work on non-Apple hardware, but I’d never actually managed a vSphere server before. Sure, I have tons of VMs at work, but the system is managed by another group, and all the VMs are Windows or Linux. So, I had to try.
Decoding Apple Serial Numbers for Date of Manufacture
At work, I’ve been heading up an Asset Management project. Inventorying everything we have, adding it to a system, and then figuring out replacement cycles, amortization, etc. Part of this has been figuring out purchase dates for things like Macs, without asking our overloaded accounting office for invoices for a couple hundred machines.
Some investigation led me to two websites, one covering the new serial numbers, and the other covering older serial numbers. Basically, they used to be very readable with numbers representing their actual numbers. Then Apple switched to using Base-27 to represent year (first or second half), and then week was similar (using a limited set of letters and numbers).
Using that information, I’ve created the following script (yes, it’s pretty ugly PHP) that should decode both old 11 digit serials, and new 12 digit ones. Because of my use case, it adds some time to the manufacturing date to come up with a reasonable “purchase date” that I then use ((in my case, it just figures the purchase date was the start of the term following manufacture)). Feel free to use, modify, etc. I just built this because the sites that actually give manufacture date usually have limits on the number of queries per hour/day etc.
Thanks!
‘2005-1’,
‘1’ => ‘2005-2’,
‘2’ => ‘2006-1’,
‘3’ => ‘2006-2’,
‘4’ => ‘2007-1’,
‘5’ => ‘2007-2’,
‘7’ => ‘2008-2’,
‘8’ => ‘2009-1’,
‘9’ => ‘2009-2’,
‘C’ => ‘2010-1’,
‘D’ => ‘2010-2’,
‘F’ => ‘2011-1’,
‘G’ => ‘2011-2’,
‘H’ => ‘2012-1’,
‘J’ => ‘2012-2’,
‘K’ => ‘2013-1’,
‘L’ => ‘2013-2’,
‘M’ => ‘2014-1’,
‘N’ => ‘2014-2’,
‘P’ => ‘2015-1’,
‘Q’ => ‘2015-2’,
‘R’ => ‘2016-1’,
‘S’ => ‘2016-2’,
‘T’ => ‘2017-1’,
‘V’ => ‘2017-2’,
‘W’ => ‘2018-1’,
‘X’ => ‘2018-2’,
‘Y’ => ‘2019-1’,
‘Z’ => ‘2019-2’
);
//Years for 11 digit serial. Yes, it ignores the year 2000 and before.
$years11 = array(
‘0’ => ‘2010’,
‘1’ => ‘2001’,
‘2’ => ‘2002’,
‘3’ => ‘2003’,
‘4’ => ‘2004’,
‘5’ => ‘2005’,
‘6’ => ‘2006’,
‘7’ => ‘2007’,
‘8’ => ‘2008’,
‘9’ => ‘2009’,
);
//Week is the next digit following year, specifying weeks 1 through 26.
//Weeks 27 through 52 are designated by the “half” of the year specified above.
$weeks = array(
‘1’ => ‘1’,
‘2’ => ‘2’,
‘3’ => ‘3’,
‘4’ => ‘4’,
‘5’ => ‘5’,
‘6’ => ‘6’,
‘7’ => ‘7’,
‘8’ => ‘8’,
‘9’ => ‘9’,
‘C’ => ’10’,
‘D’ => ’11’,
‘F’ => ’12’,
‘G’ => ’13’,
‘H’ => ’14’,
‘J’ => ’15’,
‘K’ => ’16’,
‘L’ => ’17’,
‘M’ => ’18’,
‘N’ => ’19’,
‘P’ => ’20’,
‘Q’ => ’21’,
‘R’ => ’22’,
‘T’ => ’23’,
‘V’ => ’24’,
‘W’ => ’25’,
‘X’ => ’26’
);
$monthsdays = array(
4 => ’10/01′,
1 => ’01/05′,
2 => ’04/01′,
3 => ’06/20′,
);
$serial = $_GET[‘s’];
$serial = trim(preg_replace(‘/\s+/’, ”, $serial));
$serial_length = strlen($serial);
$output = $_GET[‘o’];
$output = trim(preg_replace(‘/\s+/’, ”, $output));
if ($serial_length == 11) {
//echo “Computer Pre-2012
“;
$year = substr($serial, 2, 1);
$week = substr($serial, 3, 2);
$purchase_year = $years11[$year];
$purchase_week = $week;
} elseif ($serial_length == 12) {
//echo “Computer Post-2012
“;
$year = substr($serial, 3, 1);
$week = substr($serial, 4, 1);
$purchase_year = $years[$year];
$purchase_week = $weeks[$week];
} else {
die(“Nothing to do!”);
}
if(substr($purchase_year, -2,2) == ‘-2′) {
$purchase_week = $purchase_week + 26;
}
$purchase_year = substr($purchase_year, 0, 4);
if ($purchase_week > 36) {
$purchase_term = 1;
$purchase_year++;
} else {
$purchase_term = ceil($purchase_week/12);
}
$purchase_date = $monthsdays[$purchase_term] . “/” . $purchase_year;
if ($output==’csv’) {
echo $serial . ‘,’ . $purchase_date . “\n”;
} elseif ($output==’date’) {
echo $purchase_date . “\n”;
} else {
echo “Manufacture Year: ” . $years[$year] . ” Manufacture Week: ” . $weeks[$week] . “
“;
echo “Year: ” . $purchase_year . ” Term: ” . $purchase_term . ” Purchase Date: ” . $purchase_date;
}
?>
New Mac Pro
In 2006, work purchased a Mac Pro for me. At the time, and for years after, it was a great machine. Since its purchase, I had upgraded the CPUs, the GPU, and done everything I could to keep it chugging along for as long as possible, partly because of the ever present rumors for the last several years that Apple was just about to release a new Mac Pro. Then, finally, late last year, they finally did, and obviously it was a pretty large change from the previous Mac Pro. So, as my Mac Pro approached 8 years old, my boss ordered me a new Mac Pro, with the price understanding that a fully tricked out iMac every 3 years would amount to about the same cost as this machine. Hopefully that proves to be true. =)
So, after ordering the machine in January, and being promised the machine would ship by the end of February… I finally got the machine early April. =) Specs are pretty damn amazing, considering. 8-Core 3.0ghz Xeon E5, Dual ATI D700 GPUs with 6GB of VRAM each, 32GB of system RAM, 1TB SSD. Compared to my previous Mac Pro, which after upgrading for years was a 2x 4-core 2.67ghz Xeon, ATI 5770 with 1GB of VRAM, 10GB of System RAM, and 2x 750GB 7200RPM drives. Like I said, not bad given it’s age, but certainly not current. Especially since I couldn’t upgrade past 10.7.5 as the machine only had a 32bit EFI. Lack of VX-T sucked too, for running virtualization.
Anyway, the new machine, is pretty damn kick ass. While it lacks an optical drive (easy enough to fix with an USB3 blu-ray drive I already had), and storage is expensive/not expandable (easy enough to fix with the Drobo 5D I already had), I really can’t see a much better machine if you’re looking for a Mac, and have the money to drop. Read/Write to the SSD is quite literally 950MB/sec. So, damn fast (twice as fast as I’ve seen from any SATA based SSDs). While I’ve been unable to fully test the graphics cards, I can say the game plays both Diablo 3 and Starcraft 2 on full quality, with zero dropped frames (60fps). Obviously neither of these are great tests from a performance point of view, but they’re the games that I occasionally play, so they’re what I have. I have no doubt that it would also play most of the Valve games (Portal 2, Team Fortress, CS, etc) at full quality as well.
The machine, really, is pretty amazing. Apple have done a wonderful job of creating a computer that should make almost any professional very happy. If you need expandability, you should be able to just purchase an external PCIe enclosure, connect over Thunderbolt, and have a great setup. I’m pretty sure this machine should last me just as long as my previous Mac Pro, which means it’ll certainly deserve the name “Mac Pro”.
[xrr rating=5/5]