smartctl -t long /dev/sda (note you can specify short, but it's not as thorough as long of course).
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 161 minutes for test to complete.
Test will complete after Fri Apr 8 14:59:25 2011
Use smartctl -X to abort test.
Then just check the smartctl status again with smartctl -a /dev/sda once the test should have completed:
smartctl, additional, testssmartctl, dev, sda, specify, thorough, pc, linux, gnu, copyright, allen, http, smartmontools, sourceforge, offline, quot, execute, extended, mode, fri, apr, abort, completed,