Re: exit status for -H

Christian Franke <[email protected]> Mon, 15 Feb 2016 18:44:55 +0100
Newsgroups gmane.linux.utilities.smartmontools
Message-ID <[email protected]>
Phil Richcreek wrote:
> ...
> CASE-1:
> SMART overall-health self-assessment test result: PASSED
> exit status: 0
>
> CASE-2:
> SMART overall-health self-assessment test result: PASSED
> exit status: 32
> Please note the following marginal Attributes:
> 190 Airflow_Temperature_Cel     blah-blah-blah   Old_age Always
> In_the_past etc.
>
> Will ALL "marginally healthy" cases, as defined by smartctl -H, return
> exit status 32 and PASSED text? Or, are there other exit status values
> that might be returned in other "marginally healthy" cases?

If -H is the only option specified, there should be no other return 
codes if the SMART STATUS command works and returns PASSED.

In general, the return value of smartctl is a bitmask which may report 
several error conditions at once,
If the SMART STATUS command returns FAILED, bit 3 is set.

See section EXIT STATUS on smartctl man page for further details.

Thanks,
Christian


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140