diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog index 68f75a58d60776becacdd4b64f95c0edfe335510..955f89880644cc253b1c673035453699bd8946b4 100644 --- a/smartmontools/ChangeLog +++ b/smartmontools/ChangeLog @@ -1,5 +1,17 @@ $Id$ +2022-02-25 Douglas Gilbert <dgilbert@interlog.com> + + smartctl.cpp, scsiprint.cpp: extend --log=defects option so it + works for the SCSI Pending Defects log page (similar to ATA log + page of same name). Add --log=envrep option to output + Environmental Reporting log page (e.g. temperature(s) and + relative humidiy). Add: --log=zdevstat option to output Zone + block device statistics log page. Updated smartctl.8.in for the + above changes. Ran 'spellintian * | grep -v duplica' on source + using Ubuntu 20.04 LTS with Canadian English as the locale. + Fixed reported spelling errors. + 2022-02-23 Christian Franke <franke@computer.org> configure.ac, update-smart-drivedb.*: Use RELEASE_7_3_DRIVEDB for @@ -52,7 +64,7 @@ $Id$ 2022-02-18 Christian Franke <franke@computer.org> - Allow to specify a separate install location for drivedb.h. + Allow one to specify a separate install location for drivedb.h. This prevents that update-smart-drivedb overwrites the package installed file (Debian Bug 976696, Ubuntu Bug 1893202). @@ -169,7 +181,7 @@ $Id$ 2022-01-06 Christian Franke <franke@computer.org> - json.cpp, json.h: Allow to use any string for object keys. + json.cpp, json.h: Allows one to use any string for object keys. Convert to final key with new public function 'json::str2key()'. Rename related variables from 'key' to 'keystr'. @@ -213,7 +225,7 @@ $Id$ 2022-01-03 Christian Franke <franke@computer.org> - json.h: Allow to use std::string for object keys. + json.h: Allows one to use std::string for object keys. 2022-01-02 Douglas Gilbert <dgilbert@interlog.com> @@ -251,7 +263,7 @@ $Id$ 2021-12-21 Douglas Gilbert <dgilbert@interlog.com> - expermimental: add support for printing the SCSI Environmental + experimental: add support for printing the SCSI Environmental Reporting log (sub)page [0xd,0x1] via the -l scttemp option and select it when '-x' is given. Also generate json output. Outputs temperature and relative humidity current values and @@ -297,7 +309,7 @@ $Id$ User could be specified with new option '-u, --warn-as-user'. popen_as_ugid.cpp, popen_as_ugid.h: New files with popen() wrapper - function. It allows to change uid/gid and also prevents that + function. It allows one to change uid/gid and also prevents that unneeded file descriptors are inherited by the child process. configure.ac, Makefile.am: Enable new functionality for all OS with @@ -368,8 +380,8 @@ $Id$ smartctl.8.in, smartd.8.in: Remove EXPERIMENTAL notes for features added before 7.1. - smartd.cpp: Allow to disable preconfigured state/log files with '-'. - The previous method required to specify the '-s' and '-A' options + smartd.cpp: Allow one to disable preconfigured state/log files with + '-'. The previous method required to specify the '-s' and '-A' options with empty strings as arguments. This does not work conjunction with shell variable expansion (GH issues/115). smartd.8.in: Document new option argument. @@ -764,7 +776,8 @@ $Id$ 2020-11-23 Christian Franke <franke@computer.org> - smartd.cpp: Allow to specify a delay limit for staggered self-tests. + smartd.cpp: Allow one to specify a delay limit for staggered + self-tests. smartd.conf.5.in: Document new functionality. 2020-11-21 Christian Franke <franke@computer.org> diff --git a/smartmontools/ChangeLog-5.0-6.0 b/smartmontools/ChangeLog-5.0-6.0 index 450dd011a26fa7c2386123ed04963d7f1b4c40c1..da9f4385f18c3d061e261d4c5ae109dc498f6e11 100644 --- a/smartmontools/ChangeLog-5.0-6.0 +++ b/smartmontools/ChangeLog-5.0-6.0 @@ -478,7 +478,7 @@ smartmontools 5.43 2012-06-30 [CF] smartd: Disable auto standby also after start of scheduled self-test. - [CF] smartd: Add smartd.conf DEFAULT directive. Allows to set default + [CF] smartd: Add smartd.conf DEFAULT directive. Allows one to set default settings for multiple devices. [CF] smartd: Re-enable auto standby if smartd.conf is re-read. @@ -1318,7 +1318,7 @@ smartmontools 5.41 2011-06-09 [CF] Makefile.am: Handle examplescripts in main Makefile. Remove 'examplescripts/Makefile.am'. - [CF] configure.in: New option '--with-exampledir' allows to change + [CF] configure.in: New option '--with-exampledir' allows one to change path of 'DOCDIR/examplescripts' directory. (Debian package uses '/usr/share/doc/smartmontools/examples') @@ -1651,7 +1651,7 @@ smartmontools 5.40 2010-10-16 - Intel X25-M SSD [CF] Makefile.am: Fix unix2dos and makensis parameters to allow - to build the Windows installer on Linux also. + one to build the Windows installer on Linux also. [CF] Makefile.am: Use a separate build rule for each man page to avoid compatibility problems with BSD make. @@ -1675,7 +1675,7 @@ smartmontools 5.40 2010-10-16 Patch was provided by Richard Gregory: http://www.csc.liv.ac.uk/~greg/projects/erc/ Modified for new ata_pass_through() interface. - Linux HPT fixes ommitted for now. + Linux HPT fixes omitted for now. [CF] Fix SCT temperature table commands on big endian CPUs. @@ -1815,7 +1815,7 @@ smartmontools 5.40 2010-10-16 Autoconf 2.5x is still supported. [CF] Move drive database entries from 'knowndrives.cpp' to new file - 'drivedb.h'. This allows to update the drive database from SVN + 'drivedb.h'. This allows one to update the drive database from SVN if installation was configured with '--enable-drivedb'. Remove the Makefile target to create 'drivedb.h'. @@ -1856,7 +1856,7 @@ smartmontools 5.39.1 2010-01-28 smartmontools 5.39 2009-12-09 - [CF] do_release: Commit CHANGELOG and NEWS also. Allow to review changes. + [CF] do_release: Commit CHANGELOG and NEWS also. Allows one to review changes. [CF] Linux: Add workaround for Adaptec series 2, 5 and 5Z controllers with firmware >= 17380. Patch was provided by Phil Wilson, see: @@ -1882,7 +1882,7 @@ smartmontools 5.39 2009-12-09 - WD My Passport hard drive (USB interface) [CF] smartd: Write 'worst' attribute value to '.state' file also. - This allows to use state persistence with 'raw64' attributes. + This allows one to use state persistence with 'raw64' attributes. [CF] Rework ATA SMART attribute check in smartctl and smartd. smartd: Ignore normalized attribute value and threshold @@ -1906,7 +1906,7 @@ smartmontools 5.39 2009-12-09 [CF] Add '-v ID,raw64[,...]' print format based on a patch provided by Marcin Marszalek. - [CF] Add '-v ID,RAW_FORMAT[,ATTR_NAME]' option. This allows to add new + [CF] Add '-v ID,RAW_FORMAT[,ATTR_NAME]' option. This allows one to add new attributes without the need to enhance the '-v' option. Rework attribute name and raw value formatting. @@ -2013,7 +2013,7 @@ smartmontools 5.39 2009-12-09 [CF] Add USB IDs of Maxtor Basics Desktop and ISD-300A1. [AS] Use malloc() to ensure that the read buffer lands on a single - page. This avoids some bugs seen on LSI controlers under + page. This avoids some bugs seen on LSI controllers under FreeBSD. [CF] Add missing help text for '-d usb*' options. @@ -2218,7 +2218,7 @@ smartmontools 5.39 2009-12-09 [CF] Simplify '-v' vendor attribute option parsing. Add '-v 197,increasing' and '-v 198,increasing' options - to specifiy that an uncorrectable count is never reset. + to specify that an uncorrectable count is never reset. This modifies the printed attribute names and smartd's default setting of '-C' and '-U' directives. Both '-v' options can also be preset in the drive database. @@ -2335,7 +2335,7 @@ smartmontools 5.39 2009-12-09 - Added Hitachi Travelstar E5K160 family - Allow uppercase variants of Hitachi 5K160 drives - [CF] Fix smartctl crash on '-l directory,[gs]'. Allow to override + [CF] Fix smartctl crash on '-l directory,[gs]'. Allows one to override missing GPL feature bit or missing log dir entry with '-T permissive' option. @@ -2422,7 +2422,7 @@ smartmontools 5.39 2009-12-09 selective self-tests. Useful to perform full tests of large disks not running 24x7. - [CF] Allow to read local drive database entries from optional file + [CF] Allows one to read local drive database entries from optional file '${sysconfdir}/smart_drivedb.h'. Add configure options '--enable-drivedb' and '--with-drivedbdir=DIR'. If specified, drive database is read from '${drivedbdir}/drivedb.h'. @@ -2621,7 +2621,7 @@ smartmontools 5.39 2009-12-09 [JH] now C++ Support for QNX Target already tested for QNX 6.3.2 on x86 and armle target - [CF] Allow to set BUILD_INFO from make command line. + [CF] Allows one to set BUILD_INFO from make command line. [CF] Windows: Add MSVC8 support, remove MSVC6 project files. @@ -2802,11 +2802,11 @@ SMARTMONTOOLS STABLE RELEASE 5.38 2008/03/10 NOTE2: NOT TESTED ON LINUX. Do not use this on a production box! I will remove this NOTE2 as soon as some positive test - reports are recieved. + reports are received. NOTE3: NOT TESTED ON FREEBSD. Do not use this on a production box! I will remove this NOTE3 as soon as some positive test - reports are recieved. + reports are received. [CF] Windows installer: Added explorer drive menu, CMD window, UBCD4Win plugin, smartd service update and other minor @@ -2835,7 +2835,7 @@ SMARTMONTOOLS STABLE RELEASE 5.38 2008/03/10 out. [CF] Windows: Added IOCTL_SCSI_MINIPORT_*SMART* for commands not handled - properly by SMART_IOCTL in disk class driver. This allows to use + properly by SMART_IOCTL in disk class driver. This allows one to use READ_LOG, WRITE_LOG and ABORT_SELFTEST even if the driver does not support ATA_PASS_THROUGH. @@ -3411,7 +3411,7 @@ smartmontools 5.33 Experimental Release Windows distribution (dist-win32) and MSVC6 config.h (config-vc6). [EM] Minor change to FreeBSD inclusion of 'twe' include files. Add - code to check if they exising in /usr/include/sys to use those + code to check if they existing in /usr/include/sys to use those in preference to ones added here [EM] Very preliminary support attempt for 3Ware controllers under @@ -3891,7 +3891,7 @@ smartmontools 5.27 or mail warning script, and reports any output to SYSLOG. This gives a clearer error message if something is wrong. - [BA] smartd: Solaris init script modified to accomodate grep that + [BA] smartd: Solaris init script modified to accommodate grep that lacks '-q' quiet option. Also check for running process to kill on stop. @@ -4498,7 +4498,7 @@ smartmontools-5.1-11 [EB] Add another Fujitsu disk to knowndrives.c - [GG] match for scsi/ and ide/ in case of devfs to exclude false postives + [GG] match for scsi/ and ide/ in case of devfs to exclude false positives [BA] If SCSI device listed in /etc/smartd.conf fails to open or do SMART stuff correctly, or not enough space @@ -4863,7 +4863,7 @@ smartmontools-5.0.38 Added Italian descriptions to smartmontools.spec file. - Started impementing send-mail-on-error for smartd; not yet enabled. + Started implementing send-mail-on-error for smartd; not yet enabled. Added -P (Permissive) Directive to smartd.conf file to allow SMART monitoring of pre-ATA-3 Rev 4 disks that have SMART but do not have @@ -4924,7 +4924,7 @@ smartmontools-5.0.24 Note: it has now been confirmed that the code modifications between 5.0.23 and 5.0.24 have eliminated the GCC 3.2 problems. Note that - there is a GCC bug howerver, see #8404 at + there is a GCC bug however, see #8404 at http://gcc.gnu.org/cgi-bin/gnatsweb.pl?database=gcc&cmd=query http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8404 @@ -5023,10 +5023,10 @@ smartmontools-5.0-17 library, as it should be. modified length of device name string in smartd internal structure - to accomodate max length device name strings + to accommodate max length device name strings removed un-implemented (-e = Email notification) option from - command line arg list. We'll put it back on when implemeneted. + command line arg list. We'll put it back on when implemented. smartd now logs serious (fatal) conditions in its operation at loglevel LOG_CRIT rather than LOG_INFO before exiting with error. @@ -5071,7 +5071,7 @@ smartmontools-5.0-11 appears incapable of a SMART command that the user has asked for, complain by printing an error message, but go ahead and try anyway. Since unimplemented SMART commands should just return an - error but not cause disk problems, this should't cause any + error but not cause disk problems, this shouldn't cause any difficulty. Added two new flags: q and Q. q is quiet mode - only print: For @@ -5080,7 +5080,7 @@ smartmontools-5.0-11 SMART "disk failing" status or device attributes (pre-failure or usage) which failed either now or in the past; For the -v option device attributes (pre-failure or usage) which failed either now - or in the past. Q is Very Quiet mode: Print no ouput. The only + or in the past. Q is Very Quiet mode: Print no output. The only way to learn about what was found is to use the exit status of smartctl. @@ -5116,7 +5116,7 @@ smartmontools-5.0-11 ID. This is fixed. when starting self-tests in captive mode ioctl returns EIO because - the drive has been busied out. Detect this and don't return an eror + the drive has been busied out. Detect this and don't return an error in this case. Check this this is correct (or how to fix it?) fixed possible error in how to determine ATA standard support @@ -5219,14 +5219,14 @@ smartmontools-5.0-8: added -f and -F options to enable/disable autosave threshold parameters - changed argv parsing to use getops -- elminate buffer overflow + changed argv parsing to use getops -- eliminate buffer overflow vulnerability expanded and corrected documentation fixed problem with smartd. It did not actually call ataSmartEnable()! Since the argument was left out, the test - always suceeded because it evaluated to a pointer to the function. + always succeeded because it evaluated to a pointer to the function. smartd: closed open file descriptors if device does not support smart. Note: this still needs to be fixed for SCSI devices diff --git a/smartmontools/ChangeLog-6.0-7.0 b/smartmontools/ChangeLog-6.0-7.0 index e48c924e96958977feceda2985bf70a9a7b9d914..9bc94508722b08f96a0a69ceca12ce3311c8c9f0 100644 --- a/smartmontools/ChangeLog-6.0-7.0 +++ b/smartmontools/ChangeLog-6.0-7.0 @@ -1649,7 +1649,7 @@ $Id$ nvmeprint.cpp, nvmeprint.h, smartctl.cpp, smartctl.8.in: Add NVMe support for 'smartctl -c'. Print various drive and - namespace capabilites. Remove related info from '-i' output. + namespace capabilities. Remove related info from '-i' output. 2016-04-24 Christian Franke <franke@computer.org> @@ -1980,7 +1980,7 @@ $Id$ 2016-01-25 Alex Samorukov <samm@os2.kiev.ua> - os_darwin: add launchctl script for the smartd and remove depricated one. + os_darwin: add launchctl script for the smartd and remove deprecated one. "On current systems there is only one recommend way: launchd" 2016-01-24 Alex Samorukov <samm@os2.kiev.ua> @@ -2713,7 +2713,7 @@ $Id$ 2014-10-06 Alex Samorukov <samm@os2.kiev.ua> - drivedb.h: Exteneded regexp for SanDisk X300s (#463) + drivedb.h: Extended regexp for SanDisk X300s (#463) 2014-09-29 Alex Samorukov <samm@os2.kiev.ua> @@ -3466,7 +3466,7 @@ $Id$ scsicmds.h, scsicmds.cpp, scsiprint.h, scsiprint.cpp: - for SCSI disks, in 'smartctl --info' report physical - block size and lowest LBA alignement (if PB size + block size and lowest LBA alignment (if PB size different from LB size); logical block provisioning status (if any); and disk protection (a.k.a. DIF) type @@ -3711,8 +3711,8 @@ $Id$ 2012-11-22 Alex Samorukov <samm@os2.kiev.ua> - smartctl: implemeted support for -g/-s rcache and -g/-s wcache for SCSI - devices to control read/write device cache. + smartctl: implemented support for -g/-s rcache and -g/-s wcache for + SCSI devices to control read/write device cache. 2012-11-19 Alex Samorukov <samm@os2.kiev.ua> diff --git a/smartmontools/NEWS b/smartmontools/NEWS index 8e543e8e99de76a7feb65b096e43134dbebcbe10..390185f039ac525270f164e93f9db05f39d2cdcc 100644 --- a/smartmontools/NEWS +++ b/smartmontools/NEWS @@ -31,11 +31,11 @@ Summary: smartmontools release 7.3 - smartd '--capabilities=mail': Adds capabilities required for exim MTA. - smartd '-q *nodev0*': Three new options to change the exit status to 0 if there are no devices to monitor. -- smartd '-s' and '-A': Now allow to disable preconfigured files with '-'. +- smartd '-s' and '-A': Allows one to disable preconfigured files with '-'. - smartd: Fixed handling of multiple email addresses in conjunction with plugin scripts. Added new environment variable SMARTD_ADDRESS_ORIG. - smartd: No longer writes 'smartd -D' output to syslog on syntax error. -- smartd.conf '-c i=N': Allows to specify device specific check intervals. +- smartd.conf '-c i=N': Allows one to specify device specific check intervals. - SCSI: Retry on UNIT ATTENTION when fetching capacity. - NVMe/USB: Device type '-d sntasmedia' for ASMedia ASM2362 USB to NVMe bridges. @@ -259,7 +259,7 @@ Summary: smartmontools release 6.5 - Optional NVMe device scanning support on Linux and Windows. - configure option '--with-nvme-devicescan' to include NVMe in default device scanning result. -- Device scanning now allows to specify multiple '-d TYPE' options. +- Device scanning now allows one to specify multiple '-d TYPE' options. - ATA: Added new POWER MODE values introduced in ATA ACS-2. - ATA: SCT commands are no longer issued if ATA Security is locked. - SCSI: LB provisioning improvements. @@ -369,7 +369,7 @@ Summary: smartmontools release 6.1 - smartctl '-s/-g wcache' for SCSI devices to control write cache. - smartctl '-s/-g rcache' for SCSI devices to control read cache. - smartctl prints more info for SCSI devices: media rotation rate, - form factor, physical block size, lowest LBA alignement, + form factor, physical block size, lowest LBA alignment, logical block provisioning, disk protection type and selftest progress status. - smartctl '--identify' updated for latest ATA ACS-3 spec. @@ -505,7 +505,7 @@ Date 2010-10-16 Summary: smartmontools release 5.40 ----------------------------------------------------------- - Other config entries may precede smartd DEVICESCAN. -- Option '-v' allows to specify byte order of attribute raw value +- Option '-v' allows one to specify byte order of attribute raw value - configure: New default value for '--with-docdir'. - configure: '--enable-drivedb' is now the default. - Improved support for Intel SSDs. @@ -835,8 +835,8 @@ Summary: smartmontools release 5.19 ----------------------------------- This is the first release of smartmontools based on autoconf/automake. For this reason, it is a very experimental release. Please let us -know in particular about documenation errors/omissions, missing or -unneccesary files, and similar oversights. The major changes are: +know in particular about documentation errors/omissions, missing or +unnecessary files, and similar oversights. The major changes are: [1] installation scripts based on autoconfig/automake [2] ./configure [options] lets you set arbitrary paths [3] supports FHS with ./configure --prefix=/usr/local diff --git a/smartmontools/ataprint.cpp b/smartmontools/ataprint.cpp index e017e5ac0d10d4b1a695475389ad9dc57c4d402e..2edefe940dcdd122b34b882ae5c1bac3d3eed6bd 100644 --- a/smartmontools/ataprint.cpp +++ b/smartmontools/ataprint.cpp @@ -743,7 +743,7 @@ static void print_drive_info(const ata_identify_device * drive, jglb["trim"]["zeroed"] = trim_zeroed; } - // Print Zoned Device Capabilites if reported + // Print Zoned Device Capabilities if reported // (added in ACS-4, obsoleted in ACS-5) unsigned short zoned_caps = word069 & 0x3; if (zoned_caps) { diff --git a/smartmontools/scsiprint.cpp b/smartmontools/scsiprint.cpp index 6b716ef99a8b2a38f2aeec715a08c556937b7a08..da10f2e116306f6cb531146ffe3cb77c1789c141 100644 --- a/smartmontools/scsiprint.cpp +++ b/smartmontools/scsiprint.cpp @@ -1833,7 +1833,7 @@ scsiPrintTapeDeviceStats(scsi_device * device) jglb[jname][q] = ull; break; case 0x81: - q = "Maximum recommeded mechanism temperature exceeded"; + q = "Maximum recommended mechanism temperature exceeded"; ull = variableLengthIntegerParam(ucp); jout(" %s: %" PRIu64 "\n", q, ull); jglb[jname][q] = ull; @@ -3395,18 +3395,26 @@ scsiPrintMain(scsi_device * device, const scsi_print_options & options) } any_output = true; } - if (options.smart_error_log) { + if (options.smart_error_log || options.scsi_pending_defects) { if (! checkedSupportedLogPages) { scsiGetSupportedLogPages(device); checkedSupportedLogPages = true; } - scsiPrintErrorCounterLog(device); - if (gPendDefectsLPage) + if (options.smart_error_log) { + scsiPrintErrorCounterLog(device); + any_output = true; + } + if (gPendDefectsLPage) { scsiPrintPendingDefectsLPage(device); - if (1 == scsiFetchControlGLTSD(device, modese_len, 1)) - pout("\n[GLTSD (Global Logging Target Save Disable) set. " - "Enable Save with '-S on']\n"); - any_output = true; + any_output = true; + } + if (options.smart_error_log) { + if (1 == scsiFetchControlGLTSD(device, modese_len, 1)) { + pout("\n[GLTSD (Global Logging Target Save Disable) set. " + "Enable Save with '-S on']\n"); + any_output = true; + } + } } if (options.smart_selftest_log) { if (! checkedSupportedLogPages) { @@ -3440,7 +3448,7 @@ scsiPrintMain(scsi_device * device, const scsi_print_options & options) failuretest(OPTIONAL_CMD, returnval|=res); any_output = true; } - if (options.smart_background_log && is_zbc) { + if (options.zoned_device_stats && is_zbc) { if (! checkedSupportedLogPages) { scsiGetSupportedLogPages(device); checkedSupportedLogPages = true; @@ -3450,7 +3458,7 @@ scsiPrintMain(scsi_device * device, const scsi_print_options & options) res = scsiPrintZBDeviceStats(device); else { pout("Device does not support Zoned block device " - "characteristics logging\n"); + "statistics logging\n"); failuretest(OPTIONAL_CMD, returnval|=FAILSMART); } if (0 != res) diff --git a/smartmontools/scsiprint.h b/smartmontools/scsiprint.h index 3a06c836b4ffaa24e6ee64e8a8d275dec54e3fb1..771d5a320a41b7e44f8559cf5697c83747509775 100644 --- a/smartmontools/scsiprint.h +++ b/smartmontools/scsiprint.h @@ -37,6 +37,7 @@ struct scsi_print_options bool smart_extend_selftest = false, smart_extend_cap_selftest = false; bool smart_selftest_abort = false; bool smart_selftest_force = false; // Ignore already running test + bool scsi_pending_defects = false; bool smart_env_rep = false; @@ -44,6 +45,8 @@ struct scsi_print_options bool tape_device_stats = false; bool tape_alert = false; + + bool zoned_device_stats = false; bool get_wce = false, get_rcd = false; short int set_wce = 0, set_rcd = 0; // disable(-1), enable(1) cache diff --git a/smartmontools/smartctl.8.in b/smartmontools/smartctl.8.in index 741d1986a1db6024f3dc68d58741f0f60a784833..7b8fd3b4b8f4770b124c368e1e6935a816710cfc 100644 --- a/smartmontools/smartctl.8.in +++ b/smartmontools/smartctl.8.in @@ -275,9 +275,14 @@ For ATA devices this is equivalent to \-l xselftest,selftest \-l selective \-l directory \-l scttemp \-l scterc \-l devstat \-l defects \-l sataphy\*(Aq. .br -and for SCSI, this is equivalent to +and for SCSI disks, this is equivalent to +.br +\*(Aq\-H \-i \-g all \-A \-l error \-l selftest \-l background \-l sasphy +\-l defects \-l env_rep\*(Aq. +.br +and for SCSI zoned disks, add \-l zdevstat .br -\*(Aq\-H \-i \-g all \-A \-l error \-l selftest \-l background \-l sasphy\*(Aq. +and for SCSI tape drivers and changers, add \-l tapedevstat .br .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin For NVMe, this is equivalent to @@ -861,7 +866,7 @@ By default, exit status 2 is returned if the device is in one of the specified low-power modes. This status is also returned if the device open or identification failed (see EXIT STATUS below). -The optional STATUS parameter allows to override this default. +The optional STATUS parameter allows one to override this default. STATUS is an integer in the range from 0 to 255 inclusive. For example use \*(Aq\-n standby,0\*(Aq to return success if a device is in SLEEP or STANDBY mode. @@ -1068,8 +1073,7 @@ placed in the STANDBY mode without temporarily placing it in the IDLE mode. Note that ATA standards do not specify a command to set the standby timer without affecting the power mode. .br -[SCSI] -[NEW EXPERIMENTAL SMARTCTL FEATURE] +[SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] Only the set option with \*(Aqstandby,off\*(Aq or \*(Aqstandby,0\*(Aq is accepted and will place the SCSI disk into "ACTIVE" power condition. @@ -1080,8 +1084,7 @@ This usually spins down the drive. The setting of the standby timer is not affected unless \*(Aq\-s standby,[N|off]\*(Aq is also specified. .br -[SCSI] -[NEW EXPERIMENTAL SMARTCTL FEATURE] +[SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] Only the set option is accepted and will place the SCSI disk into "STANDBY_Z" power condition. .Sp @@ -1548,13 +1551,26 @@ the list of supported pages is printed. Device Statistics was introduced in ACS-2 and is only supported by some recent devices. .Sp .I defects[,NUM] -\- [ATA only] prints LBA and hours values from the ATA Pending Defects log +\- [ATA] prints LBA and hours values from the ATA Pending Defects log (General Purpose Log address 0x0c). Only the 31 entries from first log page are printed by default. This number can be changed by the optional parameter NUM. The size of the log and the order of the entries are vendor specific. The Pending Defects log was introduced in ACS-4 Revision 01 (Mar 2014). .Sp +.I defects +\- [SCSI: NEW EXPERIMENTAL SMARTCTL FEATURE] prints LBAs that the background +scan was unable to read (i.e. a defect). Entries, if any, show the defective +LBA and the value of the power\-on hours (since manufacture) when the background +scan found the defect. Note these pending defects may appear in advance of any +application trying to read a defective LBA. +.Sp +.I envrep +\- [SCSI only: NEW EXPERIMENTAL SMARTCTL FEATURE] +prints values and descriptions of the SCSI Environmental reporting log +page. This includes one or more temperatures and may include relative +humidities. Lifetime maximums and minimums are also reported. +.Sp .I sataphy[,reset] \- [SATA only] prints values and descriptions of the SATA Phy Event Counters (General Purpose Log address 0x11). If \*(Aq\-l sataphy,reset\*(Aq @@ -1567,14 +1583,19 @@ drives. Protocol Specific log page (log page 0x18). If \*(Aq\-l sasphy,reset\*(Aq is specified, all counters are reset after reading the values. .Sp -.I tapealert -\- [SCSI tape drives and changers] prints values and descriptions of -the (SSC) Tape Alert log page. See \fBTAPE DRIVES\fP below for issue -associated with printing this log page. +.I tapealert +\- [SCSI tape drives and changers: NEW EXPERIMENTAL SMARTCTL FEATURE] +prints values and descriptions of the (SSC) Tape Alert log page. See +\fBTAPE DRIVES\fP below for issue associated with printing this log page. .Sp .I tapedevstat -\- [SCSI tape drives and changers] prints values and descriptions of -the (SSC) Device Statistics log page. +\- [SCSI tape drives and changers: NEW EXPERIMENTAL SMARTCTL FEATURE] +prints values and descriptions of the (SSC) Device Statistics log page. +.Sp +.I zdevstat +\- [SCSI zoned disks: NEW EXPERIMENTAL SMARTCTL FEATURE] +prints values and descriptions of the Zoned Block Device Statistics log +page (ZBC\-2). .Sp .I gplog,ADDR[,FIRST[\-LAST|+SIZE]] \- [ATA only] prints a hex dump of any log accessible via General diff --git a/smartmontools/smartctl.cpp b/smartmontools/smartctl.cpp index 1021e7a109bad2e40b9c95b76f382392ee8a37ba..8e07d12c67ac42ab007f730e950a180185849ddf 100644 --- a/smartmontools/smartctl.cpp +++ b/smartmontools/smartctl.cpp @@ -178,7 +178,7 @@ static void Usage() " sasphy[,reset], sataphy[,reset], scttemp[sts,hist],\n" " scttempint,N[,p], scterc[,N,M][,p|reset], devstat[,N], defects[,N],\n" " ssd, gplog,N[,RANGE], smartlog,N[,RANGE], nvmelog,N,SIZE\n" -" tapedevstat\n\n" +" tapedevstat, zdevstat, envrep\n\n" " -v N,OPTION , --vendorattribute=N,OPTION (ATA)\n" " Set display OPTION for vendor Attribute N (see man page)\n\n" " -F TYPE, --firmwarebug=TYPE (ATA)\n" @@ -246,7 +246,7 @@ static std::string getvalidarglist(int opt) "scttemp[sts,hist], scttempint,N[,p], " "scterc[,N,M][,p|reset], devstat[,N], defects[,N], " "ssd, gplog,N[,RANGE], smartlog,N[,RANGE], " - "nvmelog,N,SIZE, tapedevstat"; + "nvmelog,N,SIZE, tapedevstat, zdevstat, envrep"; case 'P': return "use, ignore, show, showall"; case 't': @@ -546,6 +546,7 @@ static int parse_options(int argc, char** argv, const char * & type, ataopts.sct_erc_get = 1; } else if (!strcmp(optarg,"scttemp")) { ataopts.sct_temp_sts = ataopts.sct_temp_hist = true; + } else if (!strcmp(optarg,"envrep")) { scsiopts.smart_env_rep = true; } else if (!strcmp(optarg,"scttempsts")) { ataopts.sct_temp_sts = true; @@ -555,7 +556,8 @@ static int parse_options(int argc, char** argv, const char * & type, scsiopts.tape_alert = true; } else if (!strcmp(optarg,"tapedevstat")) { scsiopts.tape_device_stats = true; - + } else if (!strcmp(optarg,"zdevstat")) { + scsiopts.zoned_device_stats = true; } else if (!strncmp(optarg, "scttempint,", sizeof("scstempint,")-1)) { unsigned interval = 0; int n1 = -1, n2 = -1, len = strlen(optarg); if (!( sscanf(optarg,"scttempint,%u%n,p%n", &interval, &n1, &n2) == 1 @@ -585,6 +587,7 @@ static int parse_options(int argc, char** argv, const char * & type, int n1 = -1, n2 = -1, len = strlen(optarg); unsigned val = ~0; sscanf(optarg, "defects%n,%u%n", &n1, &val, &n2); + scsiopts.scsi_pending_defects = true; if (n1 == len) ataopts.pending_defects_log = 31; // Entries of first page else if (n2 == len && val <= 0xffff * 32 - 1) @@ -745,7 +748,9 @@ static int parse_options(int argc, char** argv, const char * & type, scsiopts.smart_ss_media_log = true; scsiopts.sasphy = true; scsiopts.smart_env_rep = true; + scsiopts.scsi_pending_defects = true; scsiopts.tape_device_stats = true; + scsiopts.zoned_device_stats = true; if (!output_format_set) ataopts.output_format |= ata_print_options::FMT_BRIEF; break; diff --git a/smartmontools/smartd.8.in b/smartmontools/smartd.8.in index 0a2e1f247c00338df3e6779f24892fefd8c7e241..201ef01530e6a227865c4800763945e0bc1bca03 100644 --- a/smartmontools/smartd.8.in +++ b/smartmontools/smartd.8.in @@ -251,7 +251,7 @@ It works with the \fBpostfix\fP MTA. If \*(Aq\-\-capabilities=mail\*(Aq is specified, the following capabilities are added to the bounding set: CAP_SETGID, CAP_SETUID, CAP_CHOWN, CAP_FOWNER, CAP_DAC_OVERRIDE. -This allows to send mail with the \fBexim\fP MTA. +This allows one to send mail with the \fBexim\fP MTA. .\" %ENDIF ENABLE_CAPABILITIES .TP .B \-d, \-\-debug diff --git a/smartmontools/smartd.conf.5.in b/smartmontools/smartd.conf.5.in index 2663d7c0b12ca6371f8a0d61b85078890be84d6a..e92d70cc23d76bdcb6170e87d33adf4de5810f75 100644 --- a/smartmontools/smartd.conf.5.in +++ b/smartmontools/smartd.conf.5.in @@ -585,7 +585,7 @@ See \*(Aqjmb39x...\*(Aq above for valid arguments. .Sp .I ignore \- the device specified by this configuration entry should be ignored. -This allows to ignore specific devices which are detected by a following +This allows one to ignore specific devices which are detected by a following DEVICESCAN configuration line. It may also be used to temporary disable longer multi-line configuration entries. This Directive may be used in conjunction with the other \*(Aq\-d\*(Aq @@ -1660,7 +1660,7 @@ Note that \-a is the default for ATA devices. If none of these other Directives is given, then \-a is assumed. .TP .B \-c OPTION=VALUE -Allows to override \fBsmartd\fP command line options for specific devices. +Allows one to override \fBsmartd\fP command line options for specific devices. Only the following OPTION is currently supported: .TP .B \-c i=N, \-c interval=N