Thursday, June 26, 2008

SMART Status on OSX

I was playing around with different tools for getting the SMART status information out of the hard drives on my computers. Of course there is no better tool than a free one. Open source smartmontools comes to the rescue on OSX. Here's how to get going.

1) Get and install macports so you can install smartmontools.

2) Install smartmontools.
sudo port install smartmontools

3) Try to query your drive's status.
smartctl -a /dev/disk0

If your drive has SMART support disabled, you're going to see something like the following:
Robbook:~ rabarton$ smartctl -a /dev/disk0
smartctl version 5.38 [i386-apple-darwin9.2.2] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 5400.3
Device Model: ST9120822AS
Serial Number: 5LZ06WLV
Firmware Version: 3.ALB
User Capacity: 120,034,123,776 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Jun 26 11:39:07 2008 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.


4) You can see SMART support is disabled on my drive, so I need to turn it on.
smartctl --smart=on /dev/disk0

5) Now query the drive's status again.
smartctl -a /dev/disk0
Now you should see something like the following:
Robbook:~ rabarton$ smartctl -a /dev/disk0
smartctl version 5.38 [i386-apple-darwin9.2.2] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus 5400.3
Device Model: ST9120822AS
Serial Number: 5LZ06WLV
Firmware Version: 3.ALB
User Capacity: 120,034,123,776 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Thu Jun 26 11:43:35 2008 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 426) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
No General Purpose Logging support.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 111) minutes.
SCT capabilities: (0x0001) SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 114 099 006 Pre-fail Always - 0
3 Spin_Up_Time 0x0003 099 098 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 094 094 020 Old_age Always - 6469
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 076 060 030 Pre-fail Always - 42617292
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 1544
10 Spin_Retry_Count 0x0013 100 100 034 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 099 099 020 Old_age Always - 1218
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 066 053 045 Old_age Always - 34 (Lifetime Min/Max 31/34)
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 246
193 Load_Cycle_Count 0x0032 036 036 000 Old_age Always - 128997
194 Temperature_Celsius 0x0022 034 047 000 Old_age Always - 34 (0 18 0 0)
195 Hardware_ECC_Recovered 0x001a 089 060 000 Old_age Always - 112978893
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 1
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 TA_Increase_Count 0x0032 098 251 000 Old_age Always - 2

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1

SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.


6) Lastly, search for SMART on Wikipedia to figure out what all the parameters mean so you can figure out how likely is that your drive is going to kick the bucket.

Handlebars

I was listening to the Flobot's song Handlebars this morning.  I had purchased it already without even realizing they were delivering a message. Really good song. Definitely check out the video too.


Thursday, June 19, 2008

Katee Shean Representing San Jose

I just found out this morning that Katee Shean from So You Think You Can Dance is representing for San Ho!

http://www.fox.com/dance/top20_katee.htm

PicLens

You MUST try this. So incredibly cool. Thanks to Art for showing me this.

http://www.piclens.com

Wednesday, June 18, 2008

Enabling PHP in Apache on OSX Leopard

There is some dated information on the web I *think* because OSX 10.5 includes Apache 2 now.  So, configuration of the web server is now in /etc/apache2/http.conf instead of /etc/httpd/http.conf.

Just open up http.conf, find the line that loads php, uncomment it, and restart your web server in OSX sharing preferences.  Easy breezy.

Monday, June 16, 2008

Kernel Panics, I/O Errors, Hard Disk Failures, Oh My!

Dorothy, Tin Man, and the Lion are skipping down the yellow brick road.

All Three: "Kernel Panics, I/O Errors, Hard Disk Failures, Oh My!"
All three: "Kernel Panics, I/O Errors, Hard Disk Failures, Oh My!"
All three: "Kernel Panics, I/O Errors, Hard Disk Failures, Oh My!"

It dawned on me this morning that the frightening things of days gone by have been replaced which has severely dated The Wizard of Oz.

Friday, June 13, 2008

BlueWordsLive Raises 2nd Quarter Estimates

Today BlueWordsLive raised quarterly earning projections to $3.57 from $3.30. CEO and founder Robert Barton said "there has been significant interest in our recent blog postings and targeted advertising which is boosting our bottom line." The stock was nowhere to be found in after hours trading.

Tuesday, June 10, 2008

Wong Microsoft! Contd.

"If your computer has any of the pre-release (Tech Preview, Beta, or CTP) versions on it, they must be removed in the correct order BEFORE you begin installing the release version. This process is not officially supported."

This just keeps getting better. Now they're imposing an order of software removal on me. Damn you people for keeping this company in business. Damn you.

Ok, I own an xbox but I think they still lost money on my purchase.

Wrong Microsoft!

"You need to make sure that .NET Framework 2.0 is installed prior to install SQL Server 2005 Developer Edition on Windows XP Professional Edition."

No Microsoft. YOU need to make sure it is installed. How hard is a simple dependency analysis?

Friday, June 6, 2008

Double Click iPhone Home Button == iPod Control

I just discovered that if my iPhone screen is off, I can still control the iPod functionality by double clicking the home button which brings up iPod controls without the typical slide to unlock and opening the iPod app. Probably well known information which will become very stale on Monday.

Thursday, June 5, 2008

Mercury is in Retrograde

I mentioned to my girlfriend this week that all the electronic gadgets in my life are misbehaving. She told me it is because Mercury is in retrograde. Then she started googling things to show me. Stupid me asked what the scientific explanation is for the problems Mercury causes. She stopped what she was doing and stared at me glaringly and said, "Are you trying to find the scientific reason behind Astrology?" At this point I realised she was talking about Astrology and I knew the correct answer to this question was most assuredly "No." Take my word gentlemen. I got it right.

So far this week the following has occurred:
1) The AppleTV could connect to my computer but would not synchronize due to what the software claimed was some ports not open on my computer. However, it magically started working a few minutes later.
2) The Tivo has crashed at least 3 times.
3) The cable company is experiencing difficulties which may have caused number 2 but I'm going to side with Mercury in retrograde.
4) My receiver has turned itself on twice. Once was at 7am this morning. Stupid Mercury waking my butt up. That just isn't funny Mercury. I never did anything to you besides ignore you because you're not very interesting. Take that lifeless planet!
5) The prototype RFID reader I'm building at work has been absolutely nuts.
6) I accidentally e-mailed the wrong person in an e-mail and the wrong person was at the other side of the wrong address? Does that make sense? Forget it.

I'm a believer now too. Mercury is in retrograde. Batten down the hatches folks.

Wednesday, June 4, 2008

Tennis

"I play tennis. The best thing about tennis is that no matter how good I get, I'll never get better than a wall. I played a wall once and that fucker was relentless." - Mitch Hedburg

I really wish I had the chance to see Mitch Hedburg when he was alive.