.ig
Copyright (C) 2002-10 Bruce Allen
-Copyright (C) 2004-17 Christian Franke
+Copyright (C) 2004-18 Christian Franke
-$Id: smartctl.8.in 4588 2017-11-04 15:15:32Z chrfranke $
+SPDX-License-Identifier: GPL-2.0-or-later
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-You should have received a copy of the GNU General Public License
-(for example COPYING); If not, see <http://www.gnu.org/licenses/>.
-
-This code was originally developed as a Senior Thesis by Michael Cornwell
-at the Concurrent Systems Laboratory (now part of the Storage Systems
-Research Center), Jack Baskin School of Engineering, University of
-California, Santa Cruz. http://ssrc.soe.ucsc.edu/
+$Id: smartctl.8.in 4882 2018-12-29 21:26:45Z chrfranke $
..
.\" Macros borrowed from pages generated with Pod::Man
For SATA or SAS disks behind an Areca controller use
\fB"/dev/arcmsr[0\-9]"\fP, see \*(Aq\-d areca,N[/E]\*(Aq below.
.Sp
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
Use the forms \fB"/dev/nvme[0\-9]"\fP (broadcast namespace) or
\fB"/dev/nvme[0\-9]n[1\-9]"\fP (specific namespace 1\-9) for first,
second, ..., NVMe device.
printed.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
-[NVMe]
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
-For NVMe devices the information is obtained from the Identify Controller
-and the Identify Namespace data structure.
+[NVMe] For NVMe devices the information is obtained from the Identify
+Controller and the Identify Namespace data structure.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
.B \-\-identify[=[w][nvb]]
.br
\*(Aq\-H \-i \-g all \-g wcreorder \-c \-A \-f brief \-l xerror,error
\-l xselftest,selftest \-l selective \-l directory \-l scttemp \-l scterc
-\-l devstat \-l sataphy\*(Aq.
+\-l devstat \-l defects \-l sataphy\*(Aq.
.br
and for SCSI, this is equivalent to
.br
smartctl \-\-scan\-open \-\- \-a \-W 4,45,50 \-m admin@work > smartd.conf
.Ve
.Sp
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
Multiple \*(Aq\-d TYPE\*(Aq options may be specified with
\*(Aq\-\-scan[\-open]\*(Aq to combine the scan results of more than one TYPE.
.TP
.TP
.B RUN-TIME BEHAVIOR OPTIONS:
.TP
+.B \-j, \-\-json[=cgiosuv]
+[NEW EXPERIMENTAL SMARTCTL FEATURE]
+Enables JSON output mode.
+.Sp
+The output could be modified or enhanced by the optional argument which
+consists of one or more characters from the set \*(Aqcgiosuv\*(Aq:
+.br
+\*(Aqc\*(Aq: Outputs \fBc\fRompact format without extra spaces and newlines.
+By default, output is pretty-printed.
+.br
+\*(Aqg\*(Aq: Outputs JSON structure as single assignments to allow the usage
+of \fBg\fRrep.
+Each assignment reflects the absolute path of a value.
+The syntax is compatible with \fBgron\fR:
+.br
+\*(Aqjson.KEY1[INDEX2].KEY3 = VALUE;\*(Aq.
+.br
+\*(Aqo\*(Aq: Includes the full \fBo\fRriginal plaintext \fBo\fRutput of
+\fBsmartctl\fR as a JSON array \*(Aqsmartctl.output[]\*(Aq.
+.br
+\*(Aqs\*(Aq: Outputs JSON object elements \fBs\fRorted by key.
+By default, object elements are ordered as generated internally.
+.br
+\*(Aqv\*(Aq: Enables \fBv\fRerbose output of possible unsafe integers.
+If specified, values which may exceed JSON safe integer (53-bit) range are
+always output as a number (with some \*(AqKEY\*(Aq) and a string
+(\*(AqKEY_s\*(Aq), regardless of the actual value.
+Values which may exceed 64-bit range are also output as a little endian
+byte array (\*(AqKEY_le\*(Aq).
+By default, the additional elements are only output if the value actually
+exceeds the range.
+.Sp
+The following two arguments are primarily indented for development:
+.br
+\*(Aqi\*(Aq: Includes lines from the plaintext output which print info already
+\fBi\fRmplemented for JSON output.
+The lines appear as objects with key \*(Aqsmartctl_NNNN_i\*(Aq.
+.br
+\*(Aqu\*(Aq: Includes lines from the plaintext output which print info still
+\fBu\fRnimplemented for JSON output.
+The lines appear as objects with key \*(Aqsmartctl_NNNN_u\*(Aq.
+.TP
.B \-q TYPE, \-\-quietmode=TYPE
Specifies that \fBsmartctl\fP should run in one of the quiet modes
described here. The valid arguments to this option are:
.Sp
.I test
\- prints the guessed TYPE, then opens the device and prints the
-(possibly changed) TYPE name and then exists without performing
+(possibly changed) TYPE name and then exits without performing
any further commands.
.Sp
.I ata
.\" %ENDIF NOT OS Darwin
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvme[,NSID]
-\- [NEW EXPERIMENTAL SMARTCTL FEATURE]
-the device type is NVM Express (NVMe).
+\- the device type is NVM Express (NVMe).
The optional parameter NSID specifies the namespace id (in hex) passed
to the driver.
Use 0xffffffff for the broadcast namespace id.
\- this device type is for SATA disks that are behind a SunplusIT USB to SATA
bridge.
.Sp
+.I sntjmicron[,NSID]
+\- [NEW EXPERIMENTAL SMARTCTL FEATURE]
+this device type is for NVMe disks that are behind a JMicron USB to NVMe
+bridge.
+The optional parameter NSID specifies the namespace id (in hex) passed
+to the driver.
+The default namespace id is the broadcast namespace id (0xffffffff).
+.Sp
.\" %ENDIF NOT OS Darwin
.\" %IF OS Linux
.I marvell
.\" %IF OS Linux Windows Cygwin
.I aacraid,H,L,ID
\- [Linux, Windows and Cygwin only] the device consists of one or more
-SCSI/SAS disks connected to an AacRaid controller.
+SCSI/SAS or SATA disks connected to an AacRaid controller.
The non-negative integers H,L,ID (Host number, Lun, ID) denote which disk
on the controller is monitored.
Use syntax such as:
.br
\fBsmartctl \-a \-d aacraid,1,0,4 /dev/sdb\fP
.Sp
+Option \*(Aq\-d sat,auto+...\*(Aq is implicitly enabled to detect SATA disks.
+Use \*(Aq\-d scsi+aacraid,H,L,ID\*(Aq to disable it.
+.Sp
.\" %ENDIF OS Linux Windows Cygwin
.\" %IF OS Linux
On Linux, the following entry in /proc/devices must exist: \fBaac\fP.
The non-negative integer N (in the range from 0 to 15 inclusive) denotes
which disk on the controller is monitored.
.Sp
+Option \*(Aq\-d sat,auto+...\*(Aq is implicitly enabled to detect SATA disks.
+Use \*(Aq\-d scsi+cciss,N\*(Aq to disable it.
+.Sp
To look at disks behind HP Smart Array controllers, use syntax
such as:
.\" %ENDIF OS FreeBSD Linux
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvmeioctl
-\- [NEW EXPERIMENTAL SMARTCTL FEATURE]
-report only ioctl() transactions with NVMe devices.
+\- report only ioctl() transactions with NVMe devices.
.Sp
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
Any argument may include a positive integer to specify the level of detail
for each initiator for each activation of the condition.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
-[NVMe]
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
-NVMe status is obtained by reading the "Critical Warning" byte from
+[NVMe] NVMe status is obtained by reading the "Critical Warning" byte from
the SMART/Health Information log.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
option also shows the estimated time required to run those tests.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
-[NVMe]
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
-Prints various NVMe device capabilities obtained from the Identify Controller
-and the Identify Namespace data structure.
+[NVMe] Prints various NVMe device capabilities obtained from the Identify
+Controller and the Identify Namespace data structure.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
.B \-A, \-\-attributes
disk attributes).
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
-[NVMe]
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
-For NVMe devices the attributes are obtained from the SMART/Health
+[NVMe] For NVMe devices the attributes are obtained from the SMART/Health
Information log.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
This is the default unless the \*(Aq\-x\*(Aq option is specified.
.Sp
.I brief
-\- New format which fits into 80 colums (except in some rare cases).
+\- New format which fits into 80 columns (except in some rare cases).
This format also decodes four additional attribute flags.
-This is the default if the \*(Aq'\-x\*(Aq option is specified.
+This is the default if the \*(Aq\-x\*(Aq option is specified.
.Sp
.I hex,id
\- Print all attribute IDs as hexadecimal numbers.
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I error[,NUM]
-\- [NVMe]
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
-prints the NVMe Error Information log.
+\- [NVMe] prints the NVMe Error Information log.
Only the 16 most recent log entries are printed by default.
This number can be changed by the optional parameter NUM.
The maximum number of log entries is vendor specific
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvmelog,PAGE,SIZE
-\- [NVMe only]
-[NEW EXPERIMENTAL SMARTCTL FEATURE]
-prints a hex dump of the first SIZE bytes from the NVMe log with
-identifier PAGE.
+\- [NVMe only] prints a hex dump of the first SIZE bytes from the NVMe
+log with identifier PAGE.
PAGE is a hexadecimal number in the range from 0x1 to 0xff.
SIZE is a hexadecimal number in the range from 0x4 to 0x4000 (16 KiB).
\fBWARNING: Do not specify the identifier of an unknown log page.
.I xerrorlba
\- Fixes LBA byte ordering in Extended Comprehensive SMART error log.
Some disks use little endian byte ordering instead of ATA register
-ordering to specifiy the LBA addresses in the log entries.
+ordering to specify the LBA addresses in the log entries.
.Sp
.I swapid
\- Fixes byte swapped ATA identify strings (device name, serial number,
.SH PACKAGE VERSION
CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
.br
-$Id: smartctl.8.in 4588 2017-11-04 15:15:32Z chrfranke $
+$Id: smartctl.8.in 4882 2018-12-29 21:26:45Z chrfranke $