TrueNAS SCALETrueNAS SCALE Nightly Development Documentation
This content follows experimental early release software. Use the Product and Version selectors above to view content specific to a stable software release.

SMART

SMART Namespace

The smart namespace has two commands and is based on S.M.A.R.T. service functions found in the SCALE API and web UI. It provides access to S.M.A.R.T. service management methods through the smart commands.

SMART Commands

The following smart commands allow you to view and edit smart properties.

You can enter commands from the main CLI prompt or from the smart namespace prompt.

The SCALE CLI guide is a work in progress! New namespace and command documentation is continually added and maintained, so check back here often to see what is new!

Interactive Argument Editor (TUI)

Enter the -- flag following any CLI command to open the interactive arguments editor text-based user interface (TUI).

Click for more information

The interactive argument editor is a text user interface (TUI) that can help enter complex commands with multiple configurable properties. It shows expected properties, defaults, input types (string, boolean, integer, or array), and can include command instructions or warnings.

Optional properties, indicated by the # symbol, are disabled by default. Required properties are enabled. Do not disable properties that are enabled by default.

To configure required properties, enter a space after the colon then add the value.

To enable optional properties, delete # from the corresponding line.

Some required properties are disabled if they are part of a pair of properties where one or the other is required. Select one property to enable and enter a value.

Press F2 or click Save to save the modified file.

Press F10, Esc, or click Quit to exit the TUI. The command automatically executes upon exit.

Config Command

The config command returns a table with current UPS settings.

Using the Config Command

Description

The config command has no required properties. Enter the command then press Enter. The command returns a table of current S.M.A.R.T. service settings when successful.

Usage

From the CLI prompt, enter:

service smart config

Command Example
service smart config
+---------------+-------+
|            id | 1     |
|      interval | 30    |
|     powermode | NEVER |
|    difference | 0     |
| informational | 0     |
|      critical | 0     |
+---------------+-------+

Update Command

The update command allows you to update S.M.A.R.T. service settings.

Using the Update Command

Description

The update command has five optional properties; interval, powermode, difference, informational, and critical. See Update Command Properties below for details. After entering update, you must include at least one property to update. Separate additional properties with a space. Enter the command string then press Enter. The command returns a blank line when successful.

Update Command Properties
PropertyDescriptionSyntax Example
intervalDefines the value in minutes for smartd to wake up and check if any tests are configured to run.interval=number
powermodeS.M.A.R.T. power mode to apply.
  • NEVER where the device is fully powered up and ready to send/receive data. The disk only undergoes S.M.A.R.T. tests when powermode is set to NEVER. Default value is NEVER.
  • IDLE where the disk completes commands slower than when set to NEVER but uses less power.
  • STANDBY where the disk completes commands slower than when set to IDLE but uses less power.
  • SLEEP where the disk does not complete commands until reset. Uses the least amount of power.
  • powermode=:MODE
    differenceEnter the threshold temperature in Celsius. Report if the temperature of a drive has changed by this many degrees Celsius since the last report. 0 disables the report. Enter the property argument using the = to separate the property and double-quoted value.difference=number
    informationalEnter the threshold temperature in Celsius. Report if the drive temperature is at or above this temperature in Celsius. 0 disables the report. Enter the property argument using the = to separate the property and double-quoted value.informational=number
    criticalEnter the threshold temperature in Celsius. If the drive temperature is higher than this value, a LOG_CRIT level log entry is created and an email is sent. 0 disables this check. Enter the property argument using the = to separate the property and double-quoted value.critical=number

    Usage

    From the CLI prompt, enter:

    service smart update property=value

    Where:

    • property is the property you want to update.
    • value is the value you want to specify for the property.

    Command Example
    service smart update interval=30 powermode=NEVER difference=0 informational=0 critical=0