Perform SMART test from the shell

This article explains how to perform the SMART short and extensive tests from the shell within Junos.

In order to determine the overall all health of a Routing Engine and in particular the Hard Drive it is useful to examine the results of the hard drive SMART tests. It is not always possible to run these commands from the CLI so and option to run them from the shell environment is needed.

It is possible to perform SMART tests from the shell environment and also get the results from these tests in order to determine the health of the hard drive. These tests and queries can however be only performed by the root users.
Note, that this shell command is not officially supported. On certain RE types this command might fail completely or partially. Even though the command is generally considered to be safe to run, it is highly recommended to do it in a maintenance window on production equipment and in consultation with JTAC.

Access the system shell environment as user root.

To show ALL SMART information use the following command.

To execute the Extended Self Test use the following command.

To execute the Short Self Test use the following command.

As the above two outputs suggest, the tests can always be stopped as follows.

The test progress can be monitored using the following command

Note: When you see “ Self-test execution status” above is “( 0) The previous self-test routine completed without error or no self-test has ever been run”, that means SmartD test is completed.

Once the tests are completed the results can be seen using the following query.

These results are standard SMART results and are not specific to Junos. As such, searching the Internet for explanations for each attribute is useful.

The time stamp value reported in the results are in relation to attribute 9 “Power on Hours Count” and are reported in hours.

About the author

Prasanna

Leave a Comment