1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621
|
.ig
Copyright (C) 2002-10 Bruce Allen
Copyright (C) 2004-23 Christian Franke
SPDX-License-Identifier: GPL-2.0-or-later
$Id: smartctl.8.in 5521 2023-07-24 16:44:49Z chrfranke $
..
.\" Macros borrowed from pages generated with Pod::Man
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp 0.4v
.if n .sp
..
.de Vb \" Begin verbatim text
.if t .ft CW
.if n .ft R
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Use groff extension \(aq (apostrophe quote, ASCII 0x27) if possible
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.TH SMARTCTL 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
.SH NAME
\fBsmartctl\fP \- Control and Monitor Utility for SMART Disks
.Sp
.SH SYNOPSIS
.B smartctl [options] device
.Sp
.SH DESCRIPTION
.\" %IF NOT OS ALL
.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
.\"! It does not contain info specific to other platforms.]
.\"! .PP
.\" %ENDIF NOT OS ALL
\fBsmartctl\fP controls the Self-Monitoring, Analysis and
Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS
hard drives and solid-state drives.
The purpose of SMART is to monitor the reliability of the hard drive
and predict drive failures, and to carry out different types of drive
self-tests.
\fBsmartctl\fP also supports some features not related to SMART.
This version of \fBsmartctl\fP is compatible with
ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
(see \fBREFERENCES\fP below).
.PP
\fBsmartctl\fP also provides support for SCSI tape drives and
changers (see \fBTAPE DRIVES\fP below).
.PP
The user must specify the device to be controlled or interrogated as
the final argument to \fBsmartctl\fP. The command set used by the device
is often derived from the device path but may need help with the \*(Aq\-d\*(Aq
option (for more information see the section on "ATA, SCSI command sets
and SAT" below).
Device paths are as follows:
.\" %IF OS Linux
.IP \fBLINUX\fP: 9
Use the forms \fB"/dev/sd[a\-z]"\fP for ATA/SATA and SCSI/SAS devices.
For SCSI Tape Drives and Changers use the
devices \fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. For disks behind
3ware controllers you may need \fB"/dev/sd[a\-z]"\fP or
\fB"/dev/twe[0\-9]"\fP, \fB"/dev/twa[0\-9]"\fP or \fB"/dev/twl[0\-9]"\fP:
see details below.
For disks behind HighPoint RocketRAID controllers you may need
\fB"/dev/sd[a\-z]"\fP. For disks behind Areca SATA RAID controllers,
you need \fB"/dev/sg[2\-9]"\fP (note that smartmontools interacts with
the Areca controllers via a SCSI generic device which is different
than the SCSI device used for reading and writing data)! For HP Smart
Array RAID controllers, there are three currently supported drivers: cciss,
hpsa, and hpahcisr. For disks accessed via the cciss driver the device nodes
are of the form \fB"/dev/cciss/c[0\-9]d0"\fP. For disks accessed via
the hpahcisr and hpsa drivers, the device nodes you need are
\fB"/dev/sg[0\-9]*"\fP.
("lsscsi \-g" is helpful in determining which scsi generic device node
corresponds to which device.)
Use the nodes corresponding to the RAID controllers, not the nodes
corresponding to logical drives.
See the \fB\-d\fP option below, as well.
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 NVMe devices.
.\" %ENDIF OS Linux
.\" %IF OS Darwin
.IP \fBDARWIN\fP: 9
Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or
equivalently \fB/dev/rdisk[0\-9]\fP.
Long forms are also available: please use \*(Aq\-h\*(Aq to see some examples.
.Sp
There is NVMe support based on the NVMeSMARTLib API in OSX.
.Sp
Note that Darwin SCSI support is not yet implemented.
.Sp
Use the OS X SAT SMART Driver to access SMART data on SAT capable USB and
Firewire devices (see INSTALL file).
.\" %ENDIF OS Darwin
.\" %IF OS FreeBSD
.IP \fBFREEBSD\fP: 9
Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
devices and \fB"/dev/da[0\-9]+"\fP or \fB"/dev/pass[0\-9]+"\fP for SCSI devices.
For SATA devices on AHCI bus use \fB"/dev/ada[0\-9]+"\fP format. For HP Smart
Array RAID controllers, use \fB"/dev/ciss[0\-9]"\fP (and see the \fB\-d\fP
option, below).
.\" %ENDIF OS FreeBSD
.\" %IF OS NetBSD OpenBSD
.IP \fBNETBSD/OPENBSD\fP: 9
Use the form \fB"/dev/wd[0\-9]+c"\fP for IDE/ATA
devices. For SCSI disk and tape devices, use the device names
\fB"/dev/sd[0\-9]+c"\fP and \fB"/dev/st[0\-9]+c"\fP respectively.
Be sure to specify the correct "whole disk" partition letter for
your architecture.
.\" %ENDIF OS NetBSD OpenBSD
.\" %IF OS Solaris
.IP \fBSOLARIS\fP: 9
Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices.
.\" %ENDIF OS Solaris
.\" %IF OS Windows Cygwin
.IP \fBWINDOWS\fP: 9
Use the forms \fB"/dev/sd[a\-z]"\fP for IDE/(S)ATA and SCSI disks
"\\\\.\\PhysicalDrive[0\-25]" (where "a" maps to "0").
Use \fB"/dev/sd[a\-z][a\-z]"\fP for "\\\\.\\PhysicalDrive[26\-...]".
These disks can also be referred to as \fB"/dev/pd[0\-255]"\fP for
"\\\\.\\PhysicalDrive[0\-255]".
ATA disks can also be referred to as \fB"/dev/hd[a\-z]"\fP for
"\\\\.\\PhysicalDrive[0\-25]".
Use one the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP,
or \fB"/dev/nst[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]".
.Sp
Alternatively, drive letters \fB"X:"\fP or \fB"X:\\"\fP may be used to
specify the (\*(Aqbasic\*(Aq) disk behind a mounted partition. This does
not work with \*(Aqdynamic\*(Aq disks.
.Sp
For disks behind 3ware 9000 controllers use \fB"/dev/sd[a\-z],N"\fP where
N specifies the disk number (3ware \*(Aqport\*(Aq) behind the controller
providing the logical drive (\*(Aqunit\*(Aq) specified by
\fB"/dev/sd[a\-z]"\fP.
Alternatively, use \fB"/dev/tw_cli/cx/py"\fP for controller x, port y
to run the \*(Aqtw_cli\*(Aq tool and parse the output. This provides limited
monitoring (\*(Aq\-i\*(Aq, \*(Aq\-c\*(Aq, \*(Aq\-A\*(Aq below) if SMART
support is missing in the driver.
Use \fB"/dev/tw_cli/stdin"\fP or \fB"/dev/tw_cli/clip"\fP
to parse CLI or 3DM output from standard input or clipboard.
The option \*(Aq\-d 3ware,N\*(Aq is not necessary on Windows.
.Sp
For disks behind Intel controller with RST driver or an AMD controller
with AMD RAID driver, use \fB"/dev/csmi[0\-9],N"\fP where N specifies the
port behind the logical scsi controller "\\\\.\\Scsi[0\-9]:".
.br
The AMD RAID driver may return incomplete information about port assignment.
To allow access to ports not reported, device scan returns all ports.
Device open fails then if the port is unused.
.Sp
By default, the AMD RAID driver only allows CSMI read accesses.
To enable write access, change the registry value
.br
\fB[HKLM\\SYSTEM\\CurrentControlSet\\Services\\rcraid\\Parameters\\Device]\fP
.br
\fB"DriverParameter"="CSMI=Limited;"\fP
.br
to
.br
\fB"DriverParameter"="CSMI=Full;"\fP
.br
and reboot.
.Sp
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
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.
Alternatively use the forms \fB"/dev/nvmes[0\-9][n[1\-9]]"\fP for NVMe devices
behind the logical scsi controller "\\\\.\\Scsi[0\-9]:".
Both forms require a NVMe driver which supports NVME_PASS_THROUGH_IOCTL.
.Sp
Use the forms \fB"/dev/sd[...]"\fP or \fB"/dev/pd[...]"\fP (see above)
for NVMe devices behind Windows 10 NVMe driver (stornvme.sys).
The pass-through functionality of this driver does not require admin rights
to retrieve device information (\*(Aq\-x\*(Aq option).
Admin rights are required if the device state is changed
(\*(Aq\-t TEST\*(Aq option).
.Sp
The prefix \fB"/dev/"\fP is optional.
.\" %ENDIF OS Windows Cygwin
.\" %IF OS OS2
.IP \fBOS/2,eComStation\fP: 9
Use the form \fB"/dev/hd[a\-z]"\fP for ATA/SATA devices using DANIS506 driver.
.Sp
Use the form \fB"/dev/ahci[a\-z]"\fP for ATA/SATA devices using OS2AHCI driver.
.\" %ENDIF OS OS2
.PP
if \*(Aq\-\*(Aq is specified as the device path, \fBsmartctl\fP reads and
interprets it's own debug output from standard input.
See \*(Aq\-r ataioctl\*(Aq below for details.
.PP
\fBsmartctl\fP guesses the device type if possible.
If necessary, the \*(Aq\-d\*(Aq option can be used to override this guess.
.PP
Note that the printed output of \fBsmartctl\fP displays most numerical
values in base 10 (decimal), but some values are displayed in base 16
(hexadecimal). To distinguish them, the base 16 values are always
displayed with a leading \fB"0x"\fP, for example: "0xff".
This man page follows the same convention.
.Sp
.SH OPTIONS
The options are grouped below into several categories. \fBsmartctl\fP
will execute the corresponding commands in the order: INFORMATION,
ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
.Sp
.TP
.B SHOW INFORMATION OPTIONS:
.TP
.B \-h, \-\-help, \-\-usage
Prints a usage message to STDOUT and exits.
.TP
.B \-V, \-\-version, \-\-copyright, \-\-license
Prints version, copyright, license, home page and SVN revision
information for your copy of \fBsmartctl\fP to STDOUT and then exits.
.TP
.B \-i, \-\-info
Prints the device model number, serial number, firmware version, and
ATA Standard version/revision information. Says if the device
supports SMART, and if so, whether SMART support is currently enabled
or disabled. If the device supports Logical Block Address mode (LBA
mode) print current user drive capacity in bytes. (If drive has a
user protected area reserved, or is "clipped", this may be smaller
than the potential maximum drive capacity.) Indicates if the drive is
in the smartmontools database (see \*(Aq\-v\*(Aq options below). If so, the
drive model family may also be printed.
If \*(Aq\-n\*(Aq (see below) is specified, the power mode of the drive is
printed.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
[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]]
[ATA only] Prints an annotated table of the IDENTIFY DEVICE data.
By default, only valid words (words not equal to 0x0000 or 0xffff)
and nonzero bits and bit fields are printed.
This can be changed by the optional argument which consists of one or
two characters from the set \*(Aqwnvb\*(Aq.
The character \*(Aqw\*(Aq enables printing of all 256 words. The character
\*(Aqn\*(Aq suppresses printing of bits, \*(Aqv\*(Aq enables printing of all
bits from valid words, \*(Aqb\*(Aq enables printing of all bits.
For example \*(Aq\-\-identify=n\*(Aq (valid words, no bits) produces the
shortest output and \*(Aq\-\-identify=wb\*(Aq (all words, all bits) produces
the longest output.
.TP
.B \-a, \-\-all
Prints all SMART information about the device.
.Sp
For ATA, this is equivalent to
.br
\*(Aq\-H \-i \-c \-A \-l error \-l selftest \-l selective\*(Aq.
.br
This option is no longer recommended for ATA disks because it does not enable
the SMART options which require support for 48-bit ATA commands
(see \*(Aq-x\*(Aq below).
.Sp
For SCSI, this is equivalent to
.br
\*(Aq\-H \-i \-A \-l error \-l selftest\*(Aq.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
For NVMe, this is equivalent to
.br
\*(Aq\-H \-i \-c \-A \-l error \-l selftest\*(Aq.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
.B \-x, \-\-xall
Prints all SMART and non-SMART information about the device.
.Sp
For ATA, this is equivalent to
.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 defects \-l sataphy\*(Aq.
.br
If \*(Aq\-a\*(Aq is also specified, add \*(Aq\-l error \-l selftest\*(Aq.
.Sp
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 envrep \-l genstats \-l ssd \-l zdevstat\*(Aq
.br
and for SCSI tape drives and changers, add \*(Aq\-l tapedevstat\*(Aq.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
For NVMe, this is equivalent to
.br
\*(Aq\-H \-i \-c \-A \-l error \-l selftest\*(Aq.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
.B \-\-scan
Scans for devices and prints each device name, device type and protocol
([ATA] or [SCSI]) info. May be used in conjunction with \*(Aq\-d TYPE\*(Aq
to restrict the scan to a specific TYPE. See also info about platform
specific device scan and the \fBDEVICESCAN\fP directive on
\fBsmartd\fP(8) man page.
.TP
.B \-\-scan\-open
Same as \-\-scan, but also tries to open each device before printing
device info. The device open may change the device type due
to autodetection (see also \*(Aq\-d test\*(Aq).
.Sp
This option can be used to create a draft \fBsmartd.conf\fP file.
All options after \*(Aq\-\-\*(Aq are appended to each output line.
For example:
.Vb 1
smartctl \-\-scan\-open \-\- \-a \-W 4,45,50 \-m admin@work > smartd.conf
.Ve
.Sp
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
.B \-g NAME, \-\-get=NAME
Get non-SMART device settings. See \*(Aq\-s, \-\-set\*(Aq below for further
info.
.Sp
.TP
.B RUN-TIME BEHAVIOR OPTIONS:
.TP
.B \-j, \-\-json[=cgiosuvy]
Enables JSON or YAML output mode.
.Sp
The output could be modified or enhanced by the optional argument which
consists of one or more characters from the set \*(Aqcgiosuvy\*(Aq:
.br
\*(Aqc\*(Aq: Outputs \fBc\fPompact format without extra spaces and newlines.
By default, output is pretty-printed.
If used with YAML format, the indentation of arrays is reduced.
.br
\*(Aqg\*(Aq: Outputs JSON structure as single assignments to allow the usage
of \fBg\fPrep.
Each assignment reflects the absolute path of a value.
The syntax is compatible with \fBgron\fP:
.br
\*(Aqjson.KEY1[INDEX2].KEY3 = VALUE;\*(Aq.
.br
\*(Aqo\*(Aq: Includes the full \fBo\fPriginal plaintext \fBo\fPutput of
\fBsmartctl\fP as a JSON array \*(Aqsmartctl.output[]\*(Aq.
.br
\*(Aqs\*(Aq: Outputs JSON object elements \fBs\fPorted by key.
By default, object elements are ordered as generated internally.
.br
\*(Aqv\*(Aq: Enables \fBv\fPerbose 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.
.br
\*(Aqy\*(Aq: Outputs in YAML format.
.Sp
The following two arguments are primarily intended for development:
.br
\*(Aqi\*(Aq: Includes lines from the plaintext output which print info already
\fBi\fPmplemented for JSON output.
The lines appear as strings with key \*(Aqsmartctl_NNNN_i\*(Aq.
.br
\*(Aqu\*(Aq: Includes lines from the plaintext output which print info still
\fBu\fPnimplemented for JSON output.
The lines appear as strings 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 errorsonly
\- only print: For the \*(Aq\-l error\*(Aq option, if nonzero, the number
of errors recorded in the SMART error log and the power-on time when
they occurred; For the \*(Aq\-l selftest\*(Aq option, errors recorded in
the device self-test log; For the \*(Aq\-H\*(Aq option, SMART "disk failing"
status or device Attributes (pre-failure or usage) which failed either now
or in the past; For the \*(Aq\-A\*(Aq option, device Attributes (pre-failure
or usage) which failed either now or in the past.
.Sp
.I silent
\- print no output. The only way to learn about what was found is to
use the exit status of \fBsmartctl\fP (see EXIT STATUS below).
.Sp
.I noserial
\- Do not print the serial number of the device.
This also suppresses the LU WWN Device Id (ATA) and the SAS addresses (SCSI).
The related fields are also invalidated in the ATA and NVMe debug outputs.
.br
Note: This is not the case in SCSI debug output.
.br
[NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
The Namespace IEEE EUI-64 (NVMe) is also suppressed.
.TP
.B \-d TYPE, \-\-device=TYPE
Specifies the type of the device.
The valid arguments to this option are:
.Sp
.I auto
\- attempt to guess the device type from the device name or from
controller type info provided by the operating system or from
a matching USB ID entry in the drive database.
This is the default.
.Sp
.I test
\- prints the guessed TYPE, then opens the device and prints the
(possibly changed) TYPE name and then exits without performing
any further commands.
.Sp
.I ata
\- the device type is ATA. This prevents
\fBsmartctl\fP
from issuing SCSI commands to an ATA device.
.Sp
.\" %IF NOT OS Darwin
.I scsi
\- the device type is SCSI. This prevents
\fBsmartctl\fP
from issuing ATA commands to a SCSI device.
.Sp
.\" %ENDIF NOT OS Darwin
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvme[,NSID]
\- 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.
The default for NSID is the namespace id addressed by the device name.
.Sp
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.\" %IF NOT OS Darwin
.I sat[,auto][,N]
\- the device type is SCSI to ATA Translation (SAT).
This is for ATA disks that have a SCSI to ATA Translation Layer (SATL)
between the disk and the operating system.
SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and
the other 16 bytes long. The default is the 16 byte variant which can be
overridden with either \*(Aq\-d sat,12\*(Aq or \*(Aq\-d sat,16\*(Aq.
.Sp
If \*(Aq\-d sat,auto\*(Aq is specified, device type SAT (for ATA/SATA disks)
is only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA ").
Otherwise device type SCSI (for SCSI/SAS disks) is used.
.Sp
.I usbasm1352r,PORT
\- [NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
this device type is for one or two SATA disks that are behind an ASMedia
ASM1352R USB to SATA (RAID) bridge.
The parameter PORT (0 or 1) selects the disk to monitor.
.br
Note: This USB bridge also supports \*(Aq\-d sat\*(Aq.
This monitors either the first disk or the second disk if no disk is
connected to the first port.
.Sp
.I usbcypress
\- this device type is for ATA disks that are behind a Cypress USB to PATA
bridge. This will use the ATACB proprietary scsi pass through command.
The default SCSI operation code is 0x24, but although it can be overridden
with \*(Aq\-d usbcypress,0xN\*(Aq, where N is the scsi operation code,
you're running the risk of damage to the device or filesystems on it.
.Sp
.I usbjmicron[,p][,x][,PORT]
\- this device type is for SATA disks that are behind a JMicron USB to
PATA/SATA bridge.
The 48-bit ATA commands (required e.g.\& for \*(Aq\-l xerror\*(Aq, see below)
do not work with all of these bridges and are therefore disabled by default.
These commands can be enabled by \*(Aq\-d usbjmicron,x\*(Aq.
If two disks are connected to a bridge with two ports, an error message is
printed if no PORT (0 or 1) is specified.
.br
The PORT parameter is not necessary if the device uses a port multiplier to
connect multiple disks to one port.
The disks appear under separate /dev/ice names then.
.br
CAUTION: Specifying \*(Aq,x\*(Aq for a device which does not support it results
in I/O errors and may disconnect the drive. The same applies if the specified
PORT does not exist or is not connected to a disk.
.Sp
The Prolific PL2507/3507 USB bridges with older firmware support a pass-through
command similar to JMicron and work with \*(Aq\-d usbjmicron,0\*(Aq.
Newer Prolific firmware requires a modified command which can be selected by
\*(Aq\-d usbjmicron,p\*(Aq.
Note that this does not yet support the SMART status command.
.Sp
.I usbprolific
\- this device type is for SATA disks that are behind a Prolific
PL2571/2771/2773/2775 USB to SATA bridge.
.Sp
.I usbsunplus
\- this device type is for SATA disks that are behind a SunplusIT USB to SATA
bridge.
.Sp
.I sntasmedia
\- [NEW EXPERIMENTAL SMARTCTL 7.3 FEATURE]
this device type is for NVMe disks that are behind an ASMedia USB to NVMe
bridge.
.Sp
.I sntjmicron[,NSID]
\- 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
.I sntrealtek
\- this device type is for NVMe disks that are behind a Realtek USB to NVMe
bridge.
.Sp
.\" %ENDIF NOT OS Darwin
.\" %IF OS Linux
.I marvell
\- [Linux only] (deprecated and subject to remove).
.Sp
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD Linux
.I megaraid,N
\- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS disks connected
to a MegaRAID controller. The non-negative integer N (in the range of 0 to
127 inclusive) denotes which disk on the controller is monitored. This interface
will also work for Dell PERC controllers.
Use syntax such as:
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS ALL
.br
FreeBSD:
.\" %ENDIF OS ALL
.\" %IF OS FreeBSD
.br
\fBsmartctl \-a \-d megaraid,2 /dev/mfi0\fP
.br
\fBsmartctl \-a \-d megaraid,0 /dev/mrsas0\fP
.Sp
.\" %ENDIF OS FreeBSD
.\" %IF OS ALL
Linux:
.\" %ENDIF OS ALL
.\" %IF OS Linux
.br
\fBsmartctl \-a \-d megaraid,2 /dev/sda\fP
.br
\fBsmartctl \-a \-d megaraid,0 /dev/sdb\fP
.br
\fBsmartctl \-a \-d megaraid,0 /dev/bus/0\fP
.br
It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus
number.
.Sp
The following entry in /proc/devices must exist:
.br
For PERC2/3/4 controllers: \fBmegadevN\fP
.br
For PERC5/6 controllers: \fBmegaraid_sas_ioctlN\fP
.Sp
.\" %ENDIF OS Linux
.\" %IF OS Linux Windows Cygwin
.I aacraid,H,L,ID
\- [Linux, Windows and Cygwin only] the device consists of one or more
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,0,0,2 /dev/sda\fP
.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.
Character device nodes /dev/aacH (H=Host number) are created if required.
.Sp
.\" %ENDIF OS Linux
.\" %IF OS Windows Cygwin
On Windows, the device name parameter /dev/sdX is ignored if
\*(Aq\-d aacraid\*(Aq is specified.
.Sp
.\" %ENDIF OS Windows Cygwin
.\" %IF OS FreeBSD Linux
.I 3ware,N
\- [FreeBSD and Linux only] the device consists of one or more ATA disks
connected to a 3ware RAID controller. The non-negative integer N
(in the range from 0 to 127 inclusive) denotes which disk on the controller
is monitored.
Use syntax such as:
.br
\fBsmartctl \-a \-d 3ware,2 /dev/sda\fP [Linux only]
.br
\fBsmartctl \-a \-d 3ware,0 /dev/twe0\fP
.br
\fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP
.br
\fBsmartctl \-a \-d 3ware,1 /dev/twl0\fP [Linux only]
.br
\fBsmartctl \-a \-d 3ware,1 /dev/tws0\fP [FreeBSD only]
.br
The first two forms, which refer to devices /dev/sda\-z (deprecated)
and /dev/twe0\-15, may be used with 3ware series 6000, 7000, and 8000
series controllers that use the 3x-xxxx driver.
The devices /dev/twa0\-15, must be used with 3ware 9000 series controllers,
which use the 3w\-9xxx driver.
The devices /dev/twl0\-15 [Linux] or /dev/tws0\-15 [FreeBSD] must be used
with the 3ware/LSI 9750 series controllers which use the 3w-sas driver.
.Sp
Note that if the special character device nodes /dev/tw[ls]?, /dev/twa?
and /dev/twe? do not exist, or exist with the incorrect major or minor
numbers, smartctl will recreate them on the fly.
.Sp
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS FreeBSD Linux Windows Cygwin
.I areca,N
\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one or
more SATA disks connected to an Areca SATA RAID controller.
The positive integer N (in the range from 1 to 24 inclusive) denotes which
disk on the controller is monitored.
.\" %ENDIF OS FreeBSD Linux Windows Cygwin
.\" %IF OS Linux
On Linux use syntax such as:
.br
\fBsmartctl \-a \-d areca,2 /dev/sg2\fP
.br
\fBsmartctl \-a \-d areca,3 /dev/sg3\fP
.br
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
On FreeBSD use syntax such as:
.br
\fBsmartctl \-a \-d areca,2 /dev/arcmsr1\fP
.br
\fBsmartctl \-a \-d areca,3 /dev/arcmsr2\fP
.br
.\" %ENDIF OS FreeBSD
.\" %IF OS Windows Cygwin
On Windows and Cygwin use syntax such as:
.br
\fBsmartctl \-a \-d areca,2 /dev/arcmsr0\fP
.br
\fBsmartctl \-a \-d areca,3 /dev/arcmsr1\fP
.br
.\" %ENDIF OS Windows Cygwin
.\" %IF OS FreeBSD Linux Windows Cygwin
The first line above addresses the second disk on the first Areca RAID
controller.
The second line addresses the third disk on the second Areca RAID
controller.
.\" %ENDIF OS FreeBSD Linux Windows Cygwin
.\" %IF OS Linux
To help identify the correct device on Linux, use the command:
.br
\fBcat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices\fP
.br
to show the SCSI generic devices (one per line, starting with
/dev/sg0). The correct SCSI generic devices to address for
smartmontools are the ones with the type field equal to 3. If the
incorrect device is addressed, please read the warning/error messages
carefully. They should provide hints about what devices to use.
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD Linux Windows Cygwin
.Sp
Important: the Areca controller must have firmware version 1.46 or
later. Lower-numbered firmware versions will give (harmless) SCSI
error messages and no SMART information.
.Sp
.I areca,N/E
\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one
or more SATA or SAS disks connected to an Areca SAS RAID controller.
The integer N (range 1 to 128) denotes the channel (slot) and E (range
1 to 8) denotes the enclosure.
Important: This requires Areca SAS controller firmware version 1.51 or later.
.Sp
.\" %ENDIF OS FreeBSD Linux Windows Cygwin
.\" %IF OS FreeBSD Linux
.I cciss,N
\- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS or
SATA disks connected to a cciss RAID controller.
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
.\" %IF OS Linux
.br
\fBsmartctl \-a \-d cciss,0 /dev/cciss/c0d0\fP (cciss driver under Linux)
.br
\fBsmartctl \-a \-d cciss,0 /dev/sg2\fP (hpsa or hpahcisr drivers under Linux)
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
.br
\fBsmartctl \-a \-d cciss,0 /dev/ciss0\fP (under FreeBSD)
.\" %ENDIF OS FreeBSD
.\" %IF OS FreeBSD Linux
.Sp
.I hpt,L/M/N
\- [FreeBSD and Linux only] the device consists of one or more ATA disks
connected to a HighPoint RocketRAID controller. The integer L is the
controller id, the integer M is the channel number, and the integer N
is the PMPort number if it is available. The allowed values of L are
from 1 to 4 inclusive, M are from 1 to 128 inclusive and N from 1 to 4
if PMPort available. And also these values are limited by the model
of the HighPoint RocketRAID controller.
Use syntax such as:
.\" %ENDIF OS FreeBSD Linux
.\" %IF OS Linux
.br
\fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP (under Linux)
.br
\fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP (under Linux)
.\" %ENDIF OS Linux
.\" %IF OS FreeBSD
.br
\fBsmartctl \-a \-d hpt,1/3 /dev/hptrr\fP (under FreeBSD)
.br
\fBsmartctl \-a \-d hpt,1/2/3 /dev/hptrr\fP (under FreeBSD)
.\" %ENDIF OS FreeBSD
.\" %IF OS FreeBSD Linux
.br
Note that the /dev/sda\-z form should be the device node which stands for
the disks derived from the HighPoint RocketRAID controllers under Linux and
under FreeBSD, it is the character device which the driver registered (eg,
/dev/hptrr, /dev/hptmv6).
.\" %ENDIF OS FreeBSD Linux
.Sp
.\" %IF OS Linux
.I sssraid,E,S
\- [Linux only: NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
the device consists of one or more SCSI/SAS or SATA disks connected to a
SSSRAID controller.
The non-negative integer E (in the range of 0 to 8) denotes the enclosure
and S (range 0 to 128) denotes the slot.
Use syntax such as:
.br
\fBsmartctl \-a \-d sssraid,0,1 /dev/bsg/sssraid0\fP
.br
It is possible to set RAID device name as /dev/bsg/sssraidN, where N is a
SCSI bus number.
.Sp
.\" %ENDIF OS Linux
.I intelliprop,N[+TYPE]
\- (deprecated and subject to remove).
.Sp
.I jmb39x[\-q],N[,sLBA][,force][+TYPE]
\- the device consists of multiple SATA disks connected to a JMicron JMB39x
RAID port multiplier.
The suffix \*(Aq\-q\*(Aq selects a slightly different command variant used by
some QNAP NAS devices.
The integer N is the port number from 0 to 4.
.br
\fBWARNING: The ATA pass-through commands are issued via READ/WRITE commands
to a LBA of the RAID volume.
Using this option with other devices may overwrite this sector.\fP
.br
The default LBA is 33.
The LBA could be selected in the range from 1 to 255 inclusive.
.br
If a GPT partition table is used, LBA 33 contains the last 4 (of 128)
entries of the partition table.
These entries are zero filled in most cases.
If a MBR partition table is used, LBA 33 may be zero filled or may contain
code from a boot loader.
.br
By default, access to the device is refused if the selected sector is not
zero filled.
The \*(Aqforce\*(Aq flag disables this check.
.br
\fBWARNING: Original sector data is not written back if smartctl is aborted
with a signal.\fP
.Sp
.I jms56x,N[,sLBA][,force][+TYPE]
\- the device consists of multiple SATA disks connected to a JMicron JMS56x
USB to SATA RAID bridge.
See \*(Aqjmb39x...\*(Aq above for valid arguments.
.TP
.B \-T TYPE, \-\-tolerance=TYPE
[ATA only] Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART
command failures.
.Sp
The behavior of \fBsmartctl\fP depends upon whether the command is
"\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means
"required by the ATA Specification if the device implements
the SMART command set" and "\fBoptional\fP" means "not required by the
ATA Specification even if the device implements the SMART
command set." The "\fBmandatory\fP" ATA and SMART commands are: (1)
ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3)
SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS.
.Sp
The valid arguments to this option are:
.Sp
.I normal
\- exit on failure of any \fBmandatory\fP SMART command, and ignore
all failures of \fBoptional\fP SMART commands. This is the default.
Note that on some devices, issuing unimplemented optional SMART
commands doesn't cause an error. This can result in misleading
\fBsmartctl\fP messages such as "Feature X not implemented", followed
shortly by "Feature X: enabled". In most such cases, contrary to the
final message, Feature X is \fBnot\fP enabled.
.Sp
.I conservative
\- exit on failure of any \fBoptional\fP SMART command.
.Sp
.I permissive
\- ignore failure(s) of \fBmandatory\fP SMART commands. This option
may be given more than once. Each additional use of this option will
cause one more additional failure to be ignored. Note that the use of
this option can lead to messages like "Feature X not supported",
followed shortly by "Feature X enable failed". In a few
such cases, contrary to the final message, Feature X \fBis\fP enabled.
.Sp
.I verypermissive
\- equivalent to giving a large number of \*(Aq\-T permissive\*(Aq options:
ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands.
Please see the note above.
.TP
.B \-b TYPE, \-\-badsum=TYPE
[ATA only] Specifies the action \fBsmartctl\fP should take if a checksum
error is detected in the: (1) Device Identity Structure, (2) SMART
Self-Test Log Structure, (3) SMART Attribute Value Structure, (4) SMART
Attribute Threshold Structure, or (5) ATA Error Log Structure.
.Sp
The valid arguments to this option are:
.Sp
.I warn
\- report the incorrect checksum but carry on in spite of it. This is the
default.
.Sp
.I exit
\- exit \fBsmartctl\fP.
.Sp
.I ignore
\- continue silently without issuing a warning.
.TP
.B \-r TYPE, \-\-report=TYPE
Intended primarily to help \fBsmartmontools\fP developers understand
the behavior of \fBsmartmontools\fP on non-conforming or poorly
conforming hardware. This option reports details of \fBsmartctl\fP
transactions with the device. The option can be used multiple times.
When used just once, it shows a record of the ioctl() transactions
with the device. When used more than once, the detail of these
ioctl() transactions are reported in greater detail. The valid
arguments to this option are:
.Sp
.I ioctl
\- report all ioctl() transactions.
.Sp
.I ataioctl
\- report only ioctl() transactions with ATA devices.
.Sp
.I scsiioctl
\- report only ioctl() transactions with SCSI devices.
Invoking this once shows the SCSI commands in hex and the corresponding status.
Invoking it a second time adds a hex listing of the first 64 bytes of data
send to, or received from the device.
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvmeioctl
\- 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
that should be reported. The argument should be followed by a comma then
the integer with no spaces. For example,
.I ataioctl,2
The default level is 1, so \*(Aq\-r ataioctl,1\*(Aq and \*(Aq\-r ataioctl\*(Aq
are equivalent.
.Sp
For testing purposes, the output of \*(Aq\-r ataioctl,2\*(Aq can later be parsed
by \fBsmartctl\fP itself if \*(Aq\-\*(Aq is used as device path argument.
The ATA command input parameters, sector data and return values are
reconstructed from the debug report read from stdin.
Then \fBsmartctl\fP internally simulates an ATA device with the same
behaviour.
This is does not work for SCSI devices yet.
.TP
.B \-n POWERMODE[,STATUS[,STATUS2]], \-\-nocheck=POWERMODE[,STATUS[,STATUS2]]
[ATA, SCSI] Specifies if \fBsmartctl\fP should exit before performing any
checks when the device is in a low-power mode.
It may be used to prevent a disk from being spun-up by \fBsmartctl\fP.
The power mode is ignored by default.
.Sp
Note: If this option is used it may also be necessary to specify the device
type with the \*(Aq\-d\*(Aq option. Otherwise the device may spin up due to
commands issued during device type autodetection.
.Sp
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 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.
Use \*(Aq\-n standby,3\*(Aq to return a unique exit status in this case.
.Sp
The valid arguments to this option are:
.Sp
.I never
\- check the device always, but print the power mode if \*(Aq\-i\*(Aq is
specified.
.Sp
.I sleep[,STATUS[,STATUS2]]
\- check the device unless it is in SLEEP mode.
.Sp
.I standby[,STATUS[,STATUS2]]
\- check the device unless it is in SLEEP or STANDBY mode. In
these modes most disks are not spinning, so if you want to prevent
a disk from spinning up, this is probably what you want.
.Sp
.I idle[,STATUS[,STATUS2]]
\- check the device unless it is in SLEEP, STANDBY or IDLE mode.
In the IDLE state, most disks are still spinning, so this is probably
not what you want.
.Sp
The \*(Aq\-n\*(Aq option is ignored if the power mode check is not supported
or returns an unknown value.
.br
[ATA only: NEW EXPERIMENTAL SMARTCTL 7.3 FEATURE]
If the optional STATUS2 parameter is specified, \fBsmartctl\fP exits
immediately with STATUS2 in this case.
For example use \*(Aq\-n standby,3,5\*(Aq to return unique exit statuses in
the STANDBY and UNSUPPORTED cases.
.TP
.B SMART FEATURE ENABLE/DISABLE COMMANDS:
.IP
.B Note:
if multiple options are used to both enable and disable a
feature, then
.B both
the enable and disable commands will be issued. The enable command
will always be issued
.B before
the corresponding disable command.
.TP
.B \-s VALUE, \-\-smart=VALUE
Enables or disables SMART on device. The valid arguments to
this option are \fIon\fP and \fIoff\fP.
.Sp
[ATA]
Note that the ATA commands SMART ENABLE/DISABLE OPERATIONS were declared
obsolete in ATA ACS-4 Revision 10 (Nov 2015).
.Sp
[SCSI tape drive or changer]
It is not necessary (or useful) to enable SMART to see the TapeAlert messages.
.TP
.B \-o VALUE, \-\-offlineauto=VALUE
[ATA only] Enables or disables SMART automatic offline test, which scans the
drive every four hours for disk defects.
This command can be given during normal system operation.
The valid arguments to this option are \fIon\fP and \fIoff\fP.
.Sp
Note that the SMART automatic offline test command is listed as
"Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
It was originally part of the SFF-8035i Revision 2.0 specification,
but was never part of any ATA specification. However it is
implemented and used by many vendors.
You can tell if automatic offline testing is supported by seeing if
this command enables and disables it, as indicated by the \*(AqAuto
Offline Data Collection\*(Aq part of the SMART capabilities report
(displayed with \*(Aq\-c\*(Aq).
.Sp
SMART provides \fBthree\fP basic categories of testing. The
\fBfirst\fP category, called "online" testing, has no effect on the
performance of the device. It is turned on by the \*(Aq\-s on\*(Aq option.
.Sp
The \fBsecond\fP category of testing is called "offline" testing.
This type of test can, in principle, degrade the device performance.
The \*(Aq\-o on\*(Aq option causes this offline testing to be carried out,
automatically, on a regular scheduled basis. Normally, the disk will
suspend offline testing while disk accesses are taking place, and then
automatically resume it when the disk would otherwise be idle, so in
practice it has little effect. Note that a one-time offline test can
also be carried out immediately upon receipt of a user command. See
the \*(Aq\-t offline\*(Aq option below, which causes a one-time offline test
to be carried out immediately.
.Sp
The choice (made by the SFF-8035i and ATA specification authors) of
the word \fItesting\fP for these first two categories is unfortunate,
and often leads to confusion. In fact these first two categories of
online and offline testing could have been more accurately described
as online and offline \fBdata collection\fP.
.Sp
The results of this automatic or immediate offline testing (data
collection) are reflected in the values of the SMART Attributes.
Thus, if problems or errors are detected, the values of these
Attributes will go below their failure thresholds; some types of
errors may also appear in the SMART error log.
These are visible with the \*(Aq\-A\*(Aq and \*(Aq\-l error\*(Aq options
respectively.
.Sp
Some SMART attribute values are updated only during off-line data
collection activities; the rest are updated during normal operation of
the device or during both normal operation and off-line testing. The
Attribute value table produced by the \*(Aq\-A\*(Aq option indicates this in
the UPDATED column. Attributes of the first type are labeled
"Offline" and Attributes of the second type are labeled "Always".
.Sp
The \fBthird\fP category of testing (and the \fIonly\fP category for
which the word \*(Aqtesting\*(Aq is really an appropriate choice) is "self"
testing. This third type of test is only performed (immediately) when
a command to run it is issued.
The \*(Aq\-t\*(Aq and \*(Aq\-X\*(Aq options can be used to carry out and
abort such self-tests; please see below for further details.
.Sp
Any errors detected in the self testing will be shown in the
SMART self-test log, which can be examined using the \*(Aq\-l selftest\*(Aq
option.
.Sp
\fBNote:\fP in this manual page, the word \fB"Test"\fP is used in
connection with the second category just described, e.g.\& for the
"offline" testing. The words \fB"Self-test"\fP are used in
connection with the third category.
.TP
.B \-S VALUE, \-\-saveauto=VALUE
[ATA] Enables or disables SMART autosave of device vendor-specific
Attributes. The valid arguments to this option are \fIon\fP
and \fIoff\fP. Note that this feature is preserved across disk power
cycles, so you should only need to issue it once.
.Sp
The ATA standard does not specify a method to check whether SMART
autosave is enabled.
Unlike SCSI (below), smartctl is unable to print a warning if autosave is
disabled.
.Sp
Note that the ATA commands SMART ENABLE/DISABLE AUTOSAVE were declared
obsolete in ATA ACS-4 Revision 10 (Nov 2015).
.Sp
[SCSI] For SCSI devices this toggles the value of the Global Logging
Target Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
manufacturers set this bit by default. This prevents error counters,
power-up hours and other useful data from being placed in non-volatile
storage, so these values may be reset to zero the next time the device
is power-cycled. If the GLTSD bit is set then \*(Aqsmartctl \-a\*(Aq will
issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable
saving counters to non-volatile storage. For extreme streaming-video
type applications you might consider using \fIoff\fP to set the GLTSD
bit.
.TP
.B \-g NAME, \-\-get=NAME, \-s NAME[,VALUE], \-\-set=NAME[,VALUE]
Gets/sets non-SMART device settings.
Note that the \*(Aq\-\-set\*(Aq option shares its short option \*(Aq\-s\*(Aq
with \*(Aq\-\-smart\*(Aq.
Valid arguments are:
.Sp
.I all
\- Gets all values.
This is equivalent to
.br
\*(Aq\-g aam \-g apm \-g lookahead \-g security \-g wcache \-g rcache \-g dsn\*(Aq
.Sp
.I aam[,N|off]
\- [ATA only] Gets/sets the Automatic Acoustic Management (AAM) feature
(if supported). A value of 128 sets the most quiet (slowest) mode and 254
the fastest (loudest) mode, \*(Aqoff\*(Aq disables AAM. Devices may support
intermediate levels. Values below 128 are defined as vendor specific (0)
or retired (1 to 127). Note that the AAM feature was declared obsolete in
ATA ACS-2 Revision 4a (Dec 2010).
.Sp
.I apm[,N|off]
\- [ATA only] Gets/sets the Advanced Power Management (APM) feature on
device (if supported). If a value between 1 and 254 is provided, it will
attempt to enable APM and set the specified value, \*(Aqoff\*(Aq disables APM.
Note the actual behavior depends on the drive, for example some drives disable
APM if their value is set above 128. Values below 128 are supposed to allow
drive spindown, values 128 and above adjust only head-parking frequency,
although the actual behavior defined is also vendor-specific.
.Sp
.I lookahead[,on|off]
\- [ATA only] Gets/sets the read look-ahead feature (if supported).
Read look-ahead is usually enabled by default.
.Sp
.I security
\- [ATA only] Gets the status of ATA Security feature (if supported).
If ATA Security is enabled an ATA user password is set. The drive will be
locked on next reset then.
.Sp
.I security-freeze
\- [ATA only] Sets ATA Security feature to frozen mode. This prevents that
the drive accepts any security commands until next reset. Note that the
frozen mode may already be set by BIOS or OS.
.Sp
.I standby,[N|off]
\- [ATA] Sets the standby (spindown) timer and places the drive in
the IDLE mode. A value of 0 or \*(Aqoff\*(Aq disables the standby timer.
Values from 1 to 240 specify timeouts from 5 seconds to 20 minutes in 5
second increments. Values from 241 to 251 specify timeouts from 30 minutes
to 330 minutes in 30 minute increments. Value 252 specifies 21 minutes.
Value 253 specifies a vendor specific time between 8 and 12 hours. Value
255 specifies 21 minutes and 15 seconds. Some drives may use a vendor
specific interpretation for the values. Note that there is no get option
because ATA standards do not specify a method to read the standby timer.
If \*(Aq\-s standby,now\*(Aq is also specified, the drive is immediately
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] Only the set option with \*(Aqstandby,off\*(Aq or
\*(Aqstandby,0\*(Aq is accepted and will place the SCSI disk
into "ACTIVE" power condition.
.Sp
.I standby,now
\- [ATA] Places the drive in the STANDBY mode.
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] Only the set option is accepted and will place the SCSI
disk into "STANDBY_Z" power condition.
.Sp
.I wcache[,on|off]
\- [ATA] Gets/sets the volatile write cache feature (if supported).
The write cache is usually enabled by default.
.Sp
.I wcache[,on|off]
\- [SCSI] Gets/sets the \*(AqWrite Cache Enable\*(Aq (WCE) bit (if supported).
The write cache is usually enabled by default.
.Sp
.I wcache-sct[,ata|on|off[,p]]
\- [ATA only] Gets/sets the write cache feature through SCT Feature Control
(if supported).
The state of write cache in SCT Feature Control could be "Controlled by ATA",
"Force Enabled", or "Force Disabled".
SCT Feature control overwrites the setting by ATA Set Features command
(wcache[,on|off] option).
If SCT Feature Control sets write cache as "Force Enabled" or "Force Disabled",
the setting of wcache[,on|off] is ignored by the drive.
SCT Feature Control usually sets write cache as "Controlled by ATA" by default.
If \*(Aq,p\*(Aq is specified, the setting is preserved across power cycles.
.Sp
.I wcreorder[,on|off[,p]]
\- [ATA only] Gets/sets Write Cache Reordering.
If it is disabled (off), disk write scheduling is executed on a
first-in-first-out (FIFO) basis. If Write Cache Reordering is enabled (on),
then disk write scheduling may be reordered by the drive. If write cache is
disabled, the current Write Cache Reordering state is remembered but has
no effect on non-cached writes, which are always written in the order received.
The state of Write Cache Reordering has no effect on either NCQ or LCQ queued
commands.
If \*(Aq,p\*(Aq is specified, the setting is preserved across power cycles.
.Sp
.I rcache[,on|off]
\- [SCSI only] Gets/sets the \*(AqRead Cache Disable\*(Aq (RCE) bit.
\*(AqOff\*(Aq value disables read cache (if supported).
The read cache is usually enabled by default.
.Sp
.I dsn[,on|off]
\- [ATA only] Gets/sets the DSN feature (if supported).
The dsn is usually disabled by default.
.Sp
.TP
.B SMART READ AND DISPLAY DATA OPTIONS:
.TP
.B \-H, \-\-health
Prints the health status of the device.
.Sp
If the device reports failing health status, this means
.B either
that the device has already failed,
.B or
that it is predicting its own failure within the next 24 hours.
If this happens, use the \*(Aq\-x\*(Aq option to get more information, and
.B get your data off the disk and to someplace safe as soon as you can.
.Sp
[ATA] Health status is obtained by checking the (boolean) result returned
by the SMART RETURN STATUS command.
The return value of this ATA command may be unknown due to limitations or
bugs in some layer (e.g.\& RAID controller or USB bridge firmware) between
disk and operating system.
In this case, \fBsmartctl\fP prints a warning and checks whether any
Prefailure SMART Attribute value is less than or equal to its threshold
(see \*(Aq\-A\*(Aq below).
.Sp
[SCSI] Health status is obtained by checking the Additional Sense Code
(ASC) and Additional Sense Code Qualifier (ASCQ) from Informal Exceptions
(IE) log page (if supported) and/or from SCSI sense data.
.Sp
[SCSI tape drive or changer] The TapeAlert status is obtained by reading the
TapeAlert log page, but only if this option is given twice (see
\fBTAPE DRIVES\fP for the rationale).
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
[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
.B \-c, \-\-capabilities
[ATA] Prints only the generic SMART capabilities. These
show what SMART features are implemented and how the device will
respond to some of the different SMART commands. For example it
shows if the device logs errors, if it supports offline surface
scanning, and so on. If the device can carry out self-tests, this
option also shows the estimated time required to run those tests.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
[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
[ATA] Prints only the vendor specific SMART Attributes. The Attributes
are numbered from 1 to 253 and have specific names and ID numbers.
For example Attribute 12 is "power cycle count": how many times has the
disk been powered up.
.Sp
Each Attribute has a "Raw" value, printed under the heading
"RAW_VALUE", and a "Normalized" value printed under the heading
"VALUE". [Note: \fBsmartctl\fP prints these values in base-10.] In
the example just given, the "Raw Value" for Attribute 12 would be the
actual number of times that the disk has been power-cycled, for
example 365 if the disk has been turned on once per day for exactly
one year. Each vendor uses their own algorithm to convert this "Raw"
value to a "Normalized" value in the range from 1 to 254. Please keep
in mind that \fBsmartctl\fP only reports the different Attribute
types, values, and thresholds as read from the device. It does
\fBnot\fP carry out the conversion between "Raw" and "Normalized"
values: this is done by the disk's firmware.
.Sp
The conversion from Raw value to a quantity with physical units is
not specified by the SMART standard. In most cases, the values printed
by \fBsmartctl\fP are sensible. For example the temperature Attribute
generally has its raw value equal to the temperature in Celsius.
However in some cases vendors use unusual conventions. For example
the Hitachi disk on my laptop reports its power-on hours in minutes,
not hours. Some IBM disks track three temperatures rather than one, in
their raw values. And so on.
.Sp
Each Attribute also has a Threshold value (whose range is 0 to 255)
which is printed under the heading "THRESH". If the Normalized value
is \fBless than or equal to\fP the Threshold value, then the Attribute
is said to have failed. If the Attribute is a pre-failure Attribute,
then disk failure is imminent.
.Sp
Each Attribute also has a "Worst" value shown under the heading
"WORST". This is the smallest (closest to failure) value that the
disk has recorded at any time during its lifetime when SMART was
enabled. [Note however that some vendors firmware may actually
\fBincrease\fP the "Worst" value for some "rate-type" Attributes.]
.Sp
The Attribute table printed out by \fBsmartctl\fP also shows the
"TYPE" of the Attribute. Attributes are one of two possible types:
Pre-failure or Old age. Pre-failure Attributes are ones which, if
less than or equal to their threshold values, indicate pending disk
failure. Old age, or usage Attributes, are ones which indicate
end-of-product life from old-age or normal aging and wearout, if
the Attribute value is less than or equal to the threshold. \fBPlease
note\fP: the fact that an Attribute is of type 'Pre-fail' does
\fBnot\fP mean that your disk is about to fail! It only has this
meaning if the Attribute's current Normalized value is less than or
equal to the threshold value.
.Sp
If the Attribute's current Normalized value is less than or equal to
the threshold value, then the "WHEN_FAILED" column will display
"FAILING_NOW". If not, but the worst recorded value is less than or
equal to the threshold value, then this column will display
"In_the_past". If the "WHEN_FAILED" column has no entry (indicated by
a dash: \*(Aq\-\*(Aq) then this Attribute is OK now (not failing) and has
also never failed in the past.
.Sp
The table column labeled "UPDATED" shows if the SMART Attribute values
are updated during both normal operation and off-line testing, or
only during offline testing. The former are labeled "Always" and the
latter are labeled "Offline".
.Sp
So to summarize: the Raw Attribute values are the ones that might have
a real physical interpretation, such as "Temperature Celsius",
"Hours", or "Start-Stop Cycles". Each manufacturer converts these,
using their detailed knowledge of the disk's operations and failure
modes, to Normalized Attribute values in the range 1\(en254. The
current and worst (lowest measured) of these Normalized Attribute
values are stored on the disk, along with a Threshold value that the
manufacturer has determined will indicate that the disk is going to
fail, or that it has exceeded its design age or aging limit.
\fBsmartctl\fP does \fBnot\fP calculate any of the Attribute values,
thresholds, or types, it merely reports them from the SMART data on
the device.
.Sp
Note that starting with ATA/ATAPI-4, revision 4, the meaning of these
Attribute fields has been made entirely vendor-specific. However most
newer ATA/SATA disks seem to respect their meaning, so we have retained
the option of printing the Attribute values.
.Sp
Solid-state drives use different meanings for some of the attributes.
In this case the attribute name printed by smartctl is incorrect unless
the drive is already in the smartmontools drive database.
.Sp
Note that the ATA command SMART READ DATA was declared obsolete in
ATA ACS-4 Revision 10 (Nov 2015).
.Sp
[SCSI] For SCSI devices the "attributes" are obtained from the temperature
and start-stop cycle counter log pages.
Certain vendor specific attributes are listed if recognised.
The attributes are output in a relatively free format (compared with ATA
disk attributes).
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
[NVMe] For NVMe devices the attributes are obtained from the SMART/Health
Information log.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.TP
.B \-f FORMAT, \-\-format=FORMAT
[ATA only] Selects the output format of the attributes:
.Sp
.I old
\- Old smartctl format.
This is the default unless the \*(Aq\-x\*(Aq option is specified.
.Sp
.I brief
\- 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.
.Sp
.I hex,id
\- Print all attribute IDs as hexadecimal numbers.
.Sp
.I hex,val
\- Print all normalized values as hexadecimal numbers.
.Sp
.I hex
\- Same as \*(Aq\-f hex,id \-f hex,val\*(Aq.
.TP
.B \-l TYPE, \-\-log=TYPE
Prints various device logs.
The valid arguments to this option are:
.Sp
.I error
\- [ATA] prints the Summary SMART error log. SMART disks maintain a log
of the most recent five non-trivial errors. For each of these errors, the
disk power-on lifetime at which the error occurred is recorded, as is
the device status (idle, standby, etc) at the time of the error. For
some common types of errors, the Error Register (ER) and Status
Register (SR) values are decoded and printed as text.
The meanings of these are:
.Vb 5
\fBABRT\fP: Command \fBAB\fPo\fBRT\fPed
\fBAMNF\fP: \fBA\fPddress \fBM\fPark \fBN\fPot \fBF\fPound
\fBCCTO\fP: \fBC\fPommand \fBC\fPompletion \fBT\fPimed \fBO\fPut
\fBEOM\fP: \fBE\fPnd \fBO\fPf \fBM\fPedia
\fBICRC\fP: \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error
\fBIDNF\fP: \fBID\fPentity \fBN\fPot \fBF\fPound
\fBILI\fP: (packet command-set specific)
\fBMC\fP: \fBM\fPedia \fBC\fPhanged
\fBMCR\fP: \fBM\fPedia \fBC\fPhange \fBR\fPequest
\fBNM\fP: \fBN\fPo \fBM\fPedia
\fBobs\fP: \fBobs\fPolete
\fBTK0NF\fP: \fBT\fPrac\fBK 0 N\fPot \fBF\fPound
\fBUNC\fP: \fBUNC\fPorrectable Error in Data
\fBWP\fP: Media is \fBW\fPrite \fBP\fProtected
.Ve
In addition, up to the last five commands that preceded the error are
listed, along with a timestamp measured from the start of the
corresponding power cycle. This is displayed in the form
Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is
minutes, SS is seconds and msec is milliseconds. [Note: this time
stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and
47.296 seconds.] The key ATA disk registers are also recorded in the
log. The final column of the error log is a text-string description
of the ATA command defined by the Command Register (CR) and Feature
Register (FR) values. Commands that are obsolete in the most current
spec are listed like this: \fBREAD LONG (w/ retry) [OBS-4]\fP,
indicating that the command became obsolete with or in the ATA-4
specification. Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is
used to indicate that a command was retired in the ATA-\fIN\fP
specification. Some commands are not defined in any version of the
ATA specification but are in common use nonetheless; these are marked
\fB[NS]\fP, meaning non-standard.
.Sp
The ATA Specification (ATA ACS-2 Revision 7, Section A.7.1) says:
\fB"Error log data structures shall include, but are not limited to,
Uncorrectable errors, ID Not Found errors for which the LBA requested was
valid, servo errors, and write fault errors. Error log data structures
shall not include errors attributed to the receipt of faulty commands."\fP
The definitions of these terms are:
.br
\fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable. This refers
to data which has been read from the disk, but for which the Error
Checking and Correction (ECC) codes are inconsistent. In effect, this
means that the data can not be read.
.br
\fBIDNF\fP (\fBID N\fPot \fBF\fPound): user-accessible address could
not be found. For READ LOG type commands, \fBIDNF\fP can also indicate
that a device data log structure checksum was incorrect.
.Sp
If the command that caused the error was a READ or WRITE command, then
the Logical Block Address (LBA) at which the error occurred will be
printed in base 10 and base 16. The LBA is a linear address, which
counts 512-byte sectors on the disk, starting from zero. (Because of
the limitations of the SMART error log, if the LBA is greater than
0xfffffff, then either no error log entry will be made, or the error
log entry will have an incorrect LBA. This may happen for drives with
a capacity greater than 128 GiB or 137 GB.) On Linux systems the
smartmontools web page has instructions about how to convert the LBA
address to the name of the disk file containing the erroneous disk
sector.
.Sp
Please note that some manufacturers \fBignore\fP the ATA
specifications, and make entries in the error log if the device
receives a command which is not implemented or is not valid.
.Sp
.I error
\- [SCSI] prints the error counter log pages for reads, write and verifies.
The verify row is only output if it has an element other than zero.
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I error[,NUM]
\- [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
(in the range from 1 to 256 inclusive).
.Sp
Note that the contents of this log is not preserved across power cycles or
controller resets, but the value of \*(AqError Information Log Entries\*(Aq
from SMART/Health Information log is.
.Sp
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I xerror[,NUM][,error]
\- [ATA only] prints the Extended Comprehensive SMART error log
(General Purpose Log address 0x03). Unlike the Summary SMART error
log (see \*(Aq\-l error\*(Aq above), it provides sufficient space to log
the contents of the 48-bit LBA register set introduced with ATA-6.
It also supports logs with more than one sector. Each sector holds
up to 4 log entries.
The actual number of log sectors is vendor specific.
.Sp
Only the 8 most recent error log entries are printed by default.
This number can be changed by the optional parameter NUM.
.Sp
If \*(Aq,error\*(Aq is appended and the Extended Comprehensive SMART error
log is not supported, the Summary SMART self-test log is printed.
.Sp
Please note that recent drives may report errors only in the Extended
Comprehensive SMART error log. The Summary SMART error log may be reported
as supported but is always empty then.
.Sp
.I selftest
\- [ATA] prints the SMART self-test log. The disk maintains a self-test
log showing the results of the self tests, which can be run using the
\*(Aq\-t\*(Aq option described below. For each of the most recent
twenty-one self-tests, the log shows the type of test (short or
extended, off-line or captive) and the final status of the test. If
the test did not complete successfully, then the percentage of the
test remaining is shown. The time at which the test took place,
measured in hours of disk lifetime, is also printed. [Note: this time
stamp wraps after 2^16 hours, or 2730 days and 16 hours, or about 7.5
years.]
If any errors were detected, the Logical Block Address (LBA)
of the first error is printed in decimal notation.
.Sp
.I selftest
\- [SCSI] the self-test log for a SCSI device has a slightly different
format than for an ATA device. For each of the most recent twenty
self-tests, it shows the type of test and the status (final or in
progress) of the test. SCSI standards use the terms "foreground" and
"background" (rather than ATA's corresponding "captive" and
"off-line") and "short" and "long" (rather than ATA's corresponding
"short" and "extended") to describe the type of the test. The printed
segment number is only relevant when a test fails in the third or
later test segment. It identifies the test that failed and consists
of either the number of the segment that failed during the test, or
the number of the test that failed and the number of the segment in
which the test was run, using a vendor-specific method of putting both
numbers into a single byte. The Logical Block Address (LBA) of the
first error is printed in hexadecimal notation.
If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and
Additional Sense Code Qualifier (ASCQ) are also printed. The self tests
can be run using the \*(Aq\-t\*(Aq option described below (using the ATA
test terminology).
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I selftest
\- [NVMe: NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
prints the NVMe self-test log.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I xselftest[,NUM][,selftest]
\- [ATA only] prints the Extended SMART self-test log (General Purpose
Log address 0x07). Unlike the SMART self-test log (see \*(Aq\-l selftest\*(Aq
above), it supports 48-bit LBA and logs with more than one sector.
Each sector holds up to 19 log entries.
The actual number of log sectors is vendor specific.
.Sp
Only the 25 most recent log entries are printed by default.
This number can be changed by the optional parameter NUM.
.Sp
If \*(Aq,selftest\*(Aq is appended and the Extended SMART self-test log is not
supported, the old SMART self-test log is printed.
.Sp
.I selective
\- [ATA only] Please see the \*(Aq\-t select\*(Aq option below for a
description of selective self-tests. The selective self-test log
shows the start/end Logical Block Addresses (LBA) of each of the five
test spans, and their current test status. If the span is being
tested or the remainder of the disk is being read-scanned, the
current 65536-sector block of LBAs being tested is also displayed.
The selective self-test log also shows if a read-scan of the
remainder of the disk will be carried out after the selective
self-test has completed (see \*(Aq\-t afterselect\*(Aq option) and the time
delay before restarting this read-scan if it is interrupted (see
\*(Aq\-t pending\*(Aq option).
.Sp
.I directory[,gs]
\- [ATA only] if the device supports the General Purpose Logging feature
set (ATA-6 and above) then this prints the Log Directory (the log at
address 0). The Log Directory shows what logs are available and their
length in sectors (512 bytes). The contents of the logs at address 1
[Summary SMART error log] and at address 6 [SMART self-test log] may
be printed using the previously-described
.I error
and
.I selftest
arguments to this option.
If your version of smartctl supports 48-bit ATA commands, both the
General Purpose Log (GPL) and SMART Log (SL) directories are printed in
one combined table. The output can be restricted to the GPL directory or
SL directory by \*(Aq\-l directory,q\*(Aq or \*(Aq\-l directory,s\*(Aq
respectively.
.Sp
.I background
\- [SCSI only] the background scan results log outputs information derived
from Background Media Scans (BMS) done after power up and/or periodically
(e.g.\& every 24 hours) on recent SCSI disks. If supported, the BMS status
is output first, indicating whether a background scan is currently
underway (and if so a progress percentage), the amount of time the disk
has been powered up and the number of scans already completed.
Then there is a header and a line for each background scan "event".
These will typically be either recovered or unrecoverable errors.
That latter group may need some attention.
There is a description of the background scan mechanism in section 4.18 of
SBC-3 revision 6 (see www.t10.org ).
.Sp
.I scttemp, scttempsts, scttemphist
\- [ATA only] prints the disk temperature information provided by the
SMART Command Transport (SCT) commands.
The option \*(Aqscttempsts\*(Aq prints current temperature and temperature
ranges returned by the SCT Status command, \*(Aqscttemphist\*(Aq prints
temperature limits and the temperature history table returned by
the SCT Data Table command, and \*(Aqscttemp\*(Aq prints both.
The temperature values are preserved across power cycles.
The logging interval can be configured with the
\*(Aq\-l scttempint,N[,p]\*(Aq option, see below.
The SCT commands were introduced in ATA8-ACS and were also
supported by many ATA-7 disks.
.Sp
.I scttempint,N[,p]
\- [ATA only] clears the SCT temperature history table and sets the
time interval for temperature logging to N minutes.
If \*(Aq,p\*(Aq is specified, the setting is preserved across power cycles.
Otherwise, the setting is volatile and will be reverted to the last
non-volatile setting by the next hard reset. The default interval
is vendor specific, typical values are 1, 2, or 5 minutes.
.Sp
.I scterc[,READTIME,WRITETIME][,p|reset]
\- [ATA only] prints values and descriptions of the SCT Error Recovery
Control settings.
These are equivalent to TLER (as used by Western Digital), CCTL (as used
by Samsung and Hitachi/HGST) and ERC (as used by Seagate).
READTIME and WRITETIME arguments (deciseconds) set the specified values.
Values of 0 disable the feature, other values less than 65 are probably not
supported.
For RAID configurations, this is typically set to 70,70 deciseconds.
.br
[NEW EXPERIMENTAL SMARTCTL 7.3 FEATURE]
If \*(Aqscterc,READTIME,WRITETIME,p\*(Aq is specified, these time values
will be persistent over a power-on reset.
If \*(Aqscterc,p\*(Aq is specified, the persistent over power-on values
are printed.
If \*(Aqscterc,reset\*(Aq is specified, all SCT timer settings are restored
to the manufacturer's default value.
The \*(Aq,p\*(Aq and \*(Aq,reset\*(Aq options require the device to support
ATA ACS-4 or higher.
.Sp
.I devstat[,PAGE]
\- [ATA only] prints values and descriptions of the ATA Device Statistics
log pages (General Purpose Log address 0x04). If no PAGE number is specified,
entries from all supported pages are printed. If PAGE 0 is specified,
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] 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 7.3 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 7.3 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 genstats
\- [SCSI only: NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
prints values and descriptions of the SCSI General statistics and performance
log page.
.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
is specified, all counters are reset after reading the values.
This also works for SATA devices with Packet interface like CD/DVD
drives.
.Sp
.I sasphy[,reset]
\- [SAS (SCSI) only] prints values and descriptions of the SAS (SSP)
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: NEW EXPERIMENTAL SMARTCTL 7.3 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: NEW EXPERIMENTAL SMARTCTL 7.3 FEATURE]
prints values and descriptions of the (SSC) Device Statistics log page.
.Sp
.I zdevstat
\- [SCSI zoned disks: NEW EXPERIMENTAL SMARTCTL 7.3 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
Purpose Logging (GPL) feature. The log address ADDR is the hex address
listed in the log directory (see \*(Aq\-l directory\*(Aq above).
The range of log sectors (pages) can be specified by decimal values
FIRST\-LAST or FIRST+SIZE. FIRST defaults to 0, SIZE defaults to 1.
LAST can be set to \*(Aqmax\*(Aq to specify the last page of the log.
.Sp
.I smartlog,ADDR[,FIRST[\-LAST|+SIZE]]
\- [ATA only] prints a hex dump of any log accessible via SMART Read
Log command. See \*(Aq\-l gplog,...\*(Aq above for parameter syntax.
.Sp
For example, all these commands:
.Vb 3
smartctl \-l gplog,0x80,10\-15 /dev/sda
smartctl \-l gplog,0x80,10+6 /dev/sda
smartctl \-l smartlog,0x80,10\-15 /dev/sda
.Ve
print pages 10\(en15 of log 0x80 (first host vendor specific log).
.Sp
The hex dump format is compatible with the \*(Aqxxd \-r\*(Aq command.
This command:
.Vb 1
smartctl \-l gplog,0x11 /dev/sda | grep ^0 | xxd \-r >log.bin
.Ve
writes a binary representation of the one sector log 0x11
(SATA Phy Event Counters) to file log.bin.
.Sp
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I nvmelog,PAGE,SIZE
\- [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.
Reading a log page may have undesirable side effects.\fP
.Sp
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.I ssd
\- [ATA] prints the Solid State Device Statistics log page.
This has the same effect as \*(Aq\-l devstat,7\*(Aq, see above.
.Sp
.I ssd
\- [SCSI] prints the Solid State Media percentage used endurance
indicator. A value of 0 indicates as new condition while 100
indicates the device is at the end of its lifetime as projected by the
manufacturer.
The value may reach 255.
.Sp
.I farm
\- [Seagate ATA or SAS (SCSI) only: NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
prints predictive drive health metrics and values from Seagate's
vendor-specific Field Access Reliability Metrics (FARM) log when used
on a drive supporting FARM.
ATA and SAS logs differ slightly.
\fBWARNING: Some Seagate drives do not support FARM.\fP
.TP
.B \-v ID,FORMAT[:BYTEORDER][,NAME], \-\-vendorattribute=ID,FORMAT...
[ATA only] Sets a vendor-specific raw value print FORMAT, an optional
BYTEORDER and an optional NAME for Attribute ID.
This option may be used multiple times.
.Sp
The Attribute ID can be in the range 1 to 255.
If \*(AqN\*(Aq is specified as ID, the settings for all Attributes are changed.
.Sp
The optional BYTEORDER consists of 1 to 8 characters from the
set \*(Aq012345rvwz\*(Aq.
The characters \*(Aq0\*(Aq to \*(Aq5\*(Aq select the byte 0 to 5 from the
48-bit raw value, \*(Aqr\*(Aq selects the reserved byte of the attribute
data block, \*(Aqv\*(Aq selects the normalized value, \*(Aqw\*(Aq selects
the worst value and \*(Aqz\*(Aq inserts a zero byte.
The default BYTEORDER is \*(Aq543210\*(Aq for all 48-bit formats,
\*(Aqr543210\*(Aq for the 54-bit formats, and \*(Aq543210wv\*(Aq for the
64-bit formats.
For example, \*(Aq\-v 5,raw48:012345\*(Aq prints the raw value of
attribute 5 with big endian instead of little endian
byte ordering.
.Sp
The NAME is a string of letters, digits and underscore. Its length should
not exceed 23 characters.
The \*(Aq\-P showall\*(Aq option reports an error if this is the case.
.Sp
.I \-v help
\- Prints (to STDOUT) a list of all valid arguments to this option,
then exits.
.Sp
Valid arguments for FORMAT are:
.Sp
.I raw8
\- Print the Raw value as six 8-bit unsigned base-10 integers.
This may be useful for decoding the meaning of the Raw value.
.Sp
.I raw16
\- Print the Raw value as three 16-bit unsigned base-10 integers.
This may be useful for decoding the meaning of the Raw value.
.Sp
.I raw48
\- Print the Raw value as a 48-bit unsigned base-10 integer.
This is the default for most attributes.
.Sp
.I hex48
\- Print the Raw value as a 12 digit hexadecimal number.
This may be useful for decoding the meaning of the Raw value.
.Sp
.I raw56
\- Print the Raw value as a 54-bit unsigned base-10 integer.
This includes the reserved byte which follows the 48-bit raw value.
.Sp
.I hex56
\- Print the Raw value as a 14 digit hexadecimal number.
This includes the reserved byte which follows the 48-bit raw value.
.Sp
.I raw64
\- Print the Raw value as a 64-bit unsigned base-10 integer.
This includes two bytes from the normalized and worst attribute value.
This raw format is used by some SSD devices with Indilinx controller.
.Sp
.I hex64
\- Print the Raw value as a 16 digit hexadecimal number.
This includes two bytes from the normalized and worst attribute value.
This raw format is used by some SSD devices with Indilinx controller.
.Sp
.I min2hour
\- Raw Attribute is power-on time in minutes. Its raw value
will be displayed in the form "Xh+Ym". Here X is hours, and Y is
minutes in the range 0\(en59 inclusive. Y is always printed with two
digits, for example "06" or "31" or "00".
.Sp
.I sec2hour
\- Raw Attribute is power-on time in seconds. Its raw value
will be displayed in the form "Xh+Ym+Zs". Here X is hours, Y is
minutes in the range 0\(en59 inclusive, and Z is seconds in the range
0\(en59 inclusive. Y and Z are always printed with two digits, for
example "06" or "31" or "00".
.Sp
.I halfmin2hour
\- Raw Attribute is power-on time, measured in units of 30
seconds. This format is used by some Samsung disks. Its raw value
will be displayed in the form "Xh+Ym". Here X is hours, and Y is
minutes in the range 0\(en59 inclusive. Y is always printed with two
digits, for example "06" or "31" or "00".
.Sp
.I msec24hour32
\- Raw Attribute is power-on time measured in 32-bit hours and 24-bit
milliseconds since last hour update. It will be displayed in the form
"Xh+Ym+Z.Ms". Here X is hours, Y is minutes, Z is seconds and M is
milliseconds.
.Sp
.I tempminmax
\- Raw Attribute is the disk temperature in Celsius. Info about
Min/Max temperature is printed if available. This is the default
for Attributes 190 and 194. The recording interval (lifetime,
last power cycle, last soft reset) of the min/max values is device
specific.
.Sp
.I temp10x
\- Raw Attribute is ten times the disk temperature in Celsius.
.Sp
.I raw16(raw16)
\- Print the raw attribute as a 16-bit value and two optional
16-bit values if these words are nonzero. This is the default
for Attributes 5 and 196.
.Sp
.I raw16(avg16)
\- Raw attribute is spin-up time. It is printed as a 16-bit value
and an optional "Average" 16-bit value if the word is nonzero.
This is the default for Attribute 3.
.Sp
.I raw24(raw8)
\- Print the raw attribute as a 24-bit value and three optional
8-bit values if these bytes are nonzero. This is the default
for Attribute 9.
.Sp
.I raw24/raw24
\- Raw Attribute contains two 24-bit values. The first is the
number of load cycles. The second is the number of unload cycles.
The difference between these two values is the number of times that
the drive was unexpectedly powered off (also called an emergency
unload). As a rule of thumb, the mechanical stress created by one
emergency unload is equivalent to that created by one hundred normal
unloads.
.Sp
.I raw24/raw32
\- Raw attribute is an error rate which consists of a 24-bit error
count and a 32-bit total count.
.Sp
The following old arguments to \*(Aq\-v\*(Aq are also still valid:
.Sp
.I 9,minutes
\- same as:
.I 9,min2hour,Power_On_Minutes.
.Sp
.I 9,seconds
\- same as:
.I 9,sec2hour,Power_On_Seconds.
.Sp
.I 9,halfminutes
\- same as:
.I 9,halfmin2hour,Power_On_Half_Minutes.
.Sp
.I 9,temp
\- same as:
.I 9,tempminmax,Temperature_Celsius.
.Sp
.I 192,emergencyretractcyclect
\- same as:
.I 192,raw48,Emerg_Retract_Cycle_Ct
.Sp
.I 193,loadunload
\- same as:
.I 193,raw24/raw24.
.Sp
.I 194,10xCelsius
\- same as:
.I 194,temp10x,Temperature_Celsius_x10.
.Sp
.I 194,unknown
\- same as:
.I 194,raw48,Unknown_Attribute.
.Sp
.I 197,increasing
\- same as:
.I 197,raw48,Total_Pending_Sectors.
Also means that Attribute number 197 (Current Pending Sector Count)
is not reset if uncorrectable sectors are reallocated
(see \fBsmartd.conf\fP(5) man page).
.Sp
.I 198,increasing
\- same as:
.I 198,raw48,Total_Offl_Uncorrectabl.
Also means that Attribute number 198 (Offline Uncorrectable Sector Count)
is not reset if uncorrectable sectors are reallocated
(see \fBsmartd.conf\fP(5) man page).
.Sp
.I 198,offlinescanuncsectorct
\- same as:
.I 198,raw48,Offline_Scan_UNC_SectCt.
.Sp
.I 200,writeerrorcount
\- same as:
.I 200,raw48,Write_Error_Count.
.Sp
.I 201,detectedtacount
\- same as:
.I 201,raw48,Detected_TA_Count.
.Sp
.I 220,temp
\- same as:
.I 220,tempminmax,Temperature_Celsius.
.TP
.B \-F TYPE, \-\-firmwarebug=TYPE
[ATA only] Modifies the behavior of \fBsmartctl\fP to compensate for some
known and understood device firmware or driver bug. This option may be used
multiple times. The valid arguments are:
.Sp
.I none
\- Assume that the device firmware obeys the ATA specifications. This
is the default, unless the device has presets for \*(Aq\-F\*(Aq in the
drive database. Using this option on the command line will override any
preset values.
.Sp
.I nologdir
\- Suppresses read attempts of SMART or GP Log Directory.
Support for all standard logs is assumed without an actual check.
Some Intel SSDs may freeze if log address 0 is read.
.Sp
.I samsung
\- In some Samsung disks (example: model SV4012H Firmware Version:
RM100-08) some of the two- and four-byte quantities in the SMART data
structures are byte-swapped (relative to the ATA specification).
Enabling this option tells \fBsmartctl\fP to evaluate these quantities
in byte-reversed order. Some signs that your disk needs this option
are (1) no self-test log printed, even though you have run self-tests;
(2) very large numbers of ATA errors reported in the ATA error log;
(3) strange and impossible values for the ATA error log timestamps.
.Sp
.I samsung2
\- In some Samsung disks the number of ATA errors reported is byte swapped.
Enabling this option tells \fBsmartctl\fP to evaluate this quantity in
byte-reversed order. An indication that your Samsung disk needs this
option is that the self-test log is printed correctly, but there are a
very large number of errors in the SMART error log. This is because
the error count is byte swapped. Thus a disk with five errors
(0x0005) will appear to have 20480 errors (0x5000).
.Sp
.I samsung3
\- Some Samsung disks (at least SP2514N with Firmware VF100-37) report
a self-test still in progress with 0% remaining when the test was already
completed. Enabling this option modifies the output of the self-test
execution status (see options \*(Aq\-c\*(Aq or \*(Aq\-a\*(Aq above)
accordingly.
.Sp
.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 specify the LBA addresses in the log entries.
.Sp
.I swapid
\- Fixes byte swapped ATA identify strings (device name, serial number,
firmware version) returned by some buggy device drivers.
.TP
.B \-P TYPE, \-\-presets=TYPE
[ATA only] Specifies whether \fBsmartctl\fP should use any preset options
that are available for this drive. By default, if the drive is recognized
in the \fBsmartmontools\fP database, then the presets are used.
.Sp
The argument
.I show
will show any preset options for your drive and the argument
.I showall
will show all known drives in the \fBsmartmontools\fP database, along
with their preset options. If there are no presets for your drive and
you think there should be (for example, a \-v or \-F option is needed
to get \fBsmartctl\fP to display correct values) then please contact
the \fBsmartmontools\fP developers so that this information can be
added to the \fBsmartmontools\fP database. Contact information is at the
end of this man page.
.Sp
The valid arguments to this option are:
.Sp
.I use
\- if a drive is recognized, then use the stored presets for it. This
is the default. Note that presets will NOT override additional
Attribute interpretation (\*(Aq\-v N,something\*(Aq) command-line options or
explicit \*(Aq\-F\*(Aq command-line options..
.Sp
.I ignore
\- do not use presets.
.Sp
.I show
\- show if the drive is recognized in the database, and if so, its
presets, then exit.
.Sp
.I showall
\- list all recognized drives, and the presets that are set for them,
then exit. This also checks the drive database regular expressions
and settings for syntax errors.
.Sp
The \*(Aq\-P showall\*(Aq option takes up to two optional arguments to
match a specific drive type and firmware version.
The command:
.Vb 1
smartctl \-P showall
.Ve
lists all entries, the command:
.Vb 1
smartctl \-P showall \*(AqMODEL\*(Aq
.Ve
lists all entries matching MODEL, and the command:
.Vb 1
smartctl \-P showall \*(AqMODEL\*(Aq \*(AqFIRMWARE\*(Aq
.Ve
lists all entries for this MODEL and a specific FIRMWARE version.
.TP
.B \-B [+]FILE, \-\-drivedb=[+]FILE
[ATA only] Read the drive database from FILE. The new database replaces
the built in database by default. If \*(Aq+\*(Aq is specified, then the new
entries prepend the built in entries.
.Sp
Optional entries are read from the file
.\" %IF NOT OS Windows
\fB/usr/local/etc/smart_drivedb.h\fP
.\" %ENDIF NOT OS Windows
.\" %IF OS ALL
(Windows: \fBEXEDIR/drivedb-add.h\fP)
.\" %ENDIF OS ALL
.\" %IF OS Windows
.\"! \fBEXEDIR/drivedb-add.h\fP
.\" %ENDIF OS Windows
.\" %IF ENABLE_DRIVEDB
if this option is not specified.
.Sp
If
.\" %IF NOT OS Windows
\fB/usr/local/var/lib/smartmontools/drivedb.h\fP
.\" %ENDIF NOT OS Windows
.\" %IF OS ALL
(Windows: \fBEXEDIR/drivedb.h\fP)
.\" %ENDIF OS ALL
.\" %IF OS Windows
.\"! \fBEXEDIR/drivedb.h\fP
.\" %ENDIF OS Windows
is present, the contents of this file is used instead of the built in table.
.\" %IF ENABLE_UPDATE_SMART_DRIVEDB
.Sp
Run
.\" %IF NOT OS Windows
\fB/usr/local/sbin/update-smart-drivedb\fP
.\" %ENDIF NOT OS Windows
.\" %IF OS ALL
(Windows: \fBEXEDIR/update-smart-drivedb.exe\fP)
.\" %ENDIF OS ALL
.\" %IF OS Windows
.\"! \fBEXEDIR/update-smart-drivedb.exe\fP
.\" %ENDIF OS Windows
to update this file from the smartmontools SVN repository.
.\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
.\" %ENDIF ENABLE_DRIVEDB
.Sp
The database files use the same C/C++ syntax that is used to initialize
the built in database array.
C/C++ style comments are allowed.
Example:
.Sp
.Vb 8
/* Full entry: */
{
"Model family", // Info about model family/series.
"MODEL1.*REGEX", // Regular expression to match model of device.
"VERSION.*REGEX", // Regular expression to match firmware version(s).
"Some warning", // Warning message.
"\-v 9,minutes" // String of preset \-v and \-F options.
},
/* Minimal entry: */
{
"", // No model family/series info.
"MODEL2.*REGEX", // Regular expression to match model of device.
"", // All firmware versions.
"", // No warning.
"" // No options preset.
},
/* USB ID entry: */
{
"USB: Device; Bridge", // Info about USB device and bridge name.
"0x1234:0xabcd", // Regular expression to match vendor:product ID.
"0x0101", // Regular expression to match bcdDevice.
"", // Not used.
"\-d sat" // String with device type option.
},
/* ... */
.Ve
.Sp
.TP
.B SMART RUN/ABORT OFFLINE TEST AND self-test OPTIONS:
.TP
.B \-t TEST, \-\-test=TEST
Executes TEST immediately. The \*(Aq\-C\*(Aq option can be used in
conjunction with this option to run the short or long (and also for
ATA devices, selective or conveyance) self-tests in captive mode
(known as "foreground mode" for SCSI devices). Note that only one
test type can be run at a time, so only one test type should be
specified per command line. Note also that if a computer is shutdown
or power cycled during a self-test, no harm should result. The
self-test will either be aborted or will resume automatically.
.Sp
All \*(Aq\-t TEST\*(Aq commands can be given during normal system operation
unless captive mode (\*(Aq\-C\*(Aq option) is used.
A running self-test can, however, degrade performance of the drive.
Frequent I/O requests from the operating system increase the duration
of a test. These impacts may vary from device to device.
.Sp
If a test failure occurs then the device may discontinue the testing
and report the result immediately.
.Sp
[ATA]
Note that the ATA command SMART EXECUTE OFF-LINE IMMEDIATE (the command to
start a test) was declared obsolete in ATA ACS-4 Revision 10 (Nov 2015).
.Sp
The valid arguments to this option are:
.Sp
.I offline
\- [ATA] runs SMART Immediate Offline Test. This immediately
starts the test described above. This command can be given during
normal system operation. The effects of this test are visible only in
that it updates the SMART Attribute values, and if errors are
found they will appear in the SMART error log, visible with the
\*(Aq\-l error\*(Aq option.
.Sp
If the \*(Aq\-c\*(Aq option to \fBsmartctl\fP shows that the device has the
"Suspend Offline collection upon new command" capability then you can
track the progress of the Immediate Offline test using the \*(Aq\-c\*(Aq
option to \fBsmartctl\fP. If the \*(Aq\-c\*(Aq option show that the device
has the "Abort Offline collection upon new command" capability then
most commands will abort the Immediate Offline Test, so you should not
try to track the progress of the test with \*(Aq\-c\*(Aq, as it will abort
the test.
.Sp
.I offline
\- [SCSI] runs the default self test in foreground.
No entry is placed in the self test log.
.Sp
.I short
\- [ATA] runs SMART Short Self Test (usually under ten minutes).
This command can be given during normal system operation (unless run in
captive mode \- see the \*(Aq\-C\*(Aq option below). This is a
test in a different category than the immediate or automatic offline
tests. The "Self" tests check the electrical and mechanical
performance as well as the read performance of the disk. Their
results are reported in the Self Test Error Log, readable with
the \*(Aq\-l selftest\*(Aq option. Note that on some disks the progress of
the self-test can be monitored by watching this log during the self-test;
with other disks use the \*(Aq\-c\*(Aq option to monitor progress.
.Sp
.I short
\- [SCSI] runs the "Background short" self-test.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I short
\- [NVMe: NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
runs the "Short" self-test for current namespace.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I long
\- [ATA] runs SMART Extended Self Test (tens of minutes to several hours).
This is a longer and more thorough version of the Short Self Test described
above. Note that this command can be given during normal
system operation (unless run in captive mode \- see the \*(Aq\-C\*(Aq option
below).
.Sp
.I long
\- [SCSI] runs the "Background long" self-test.
.\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I long
\- [NVMe: NEW EXPERIMENTAL SMARTCTL 7.4 FEATURE]
runs the "Extended" self-test for current namespace.
.\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
.Sp
.I conveyance
\- [ATA only] runs a SMART Conveyance Self Test (minutes). This
self-test routine is intended to identify damage incurred during
transporting of the device. This self-test routine should take on the
order of minutes to complete. Note that this command can be given
during normal system operation (unless run in captive mode \- see the
\*(Aq\-C\*(Aq option below).
.Sp
.I select,N\-M, select,N+SIZE
\- [ATA only] runs a SMART Selective Self Test, to test a \fBrange\fP
of disk Logical Block Addresses (LBAs), rather than the entire disk.
Each range of LBAs that is checked is called a "span" and is specified
by a starting LBA (N) and an ending LBA (M) with N less than or equal
to M.
The range can also be specified as N+SIZE.
A span at the end of a disk can be specified by N\-\fBmax\fP.
.Sp
For example the commands:
.Vb 2
smartctl \-t select,10\-20 /dev/sda
smartctl \-t select,10+11 /dev/sda
.Ve
both runs a self test on one span consisting of LBAs ten to twenty
(inclusive).
The command:
.Vb 1
smartctl \-t select,100000000\-max /dev/sda
.Ve
run a self test from LBA 100000000 up to the end of the disk.
The \*(Aq\-t\*(Aq option can be given up to five times, to test
up to five spans. For example the command:
.Vb 1
smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/sda
.Ve
runs a self test on two spans. The first span consists of 101 LBAs
and the second span consists of 1001 LBAs. Note that the spans can
overlap partially or completely, for example:
.Vb 1
smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/sda
.Ve
The results of the selective self-test can be obtained (both during
and after the test) by printing the SMART self-test log, using the
\*(Aq\-l selftest\*(Aq option to smartctl.
.Sp
Selective self tests are particularly useful as disk capacities
increase: an extended self test (smartctl \-t long) can take several
hours. Selective self-tests are helpful if (based on SYSLOG error
messages, previous failed self-tests, or SMART error log entries) you
suspect that a disk is having problems at a particular range of
Logical Block Addresses (LBAs).
.Sp
Selective self-tests can be run during normal system operation (unless
done in captive mode \- see the \*(Aq\-C\*(Aq option below).
.Sp
The following variants of the selective self-test command use spans based
on the ranges from past tests already stored on the disk:
.Sp
.I select,redo[+SIZE]
\- [ATA only] redo the last SMART Selective Self Test using the same LBA
range.
The starting LBA is identical to the LBA used by last test, same for ending
LBA unless a new span size is specified by optional +SIZE argument.
.Sp
For example the commands:
.Vb 3
smartctl \-t select,10\-20 /dev/sda
smartctl \-t select,redo /dev/sda
smartctl \-t select,redo+20 /dev/sda
.Ve
have the same effect as:
.Vb 3
smartctl \-t select,10\-20 /dev/sda
smartctl \-t select,10\-20 /dev/sda
smartctl \-t select,10\-29 /dev/sda
.Ve
.Sp
.I select,next[+SIZE]
\- [ATA only] runs a SMART Selective Self Test on the LBA range which
follows the range of the last test.
The starting LBA is set to (ending LBA +1) of the last test.
A new span size may be specified by the optional +SIZE argument.
.Sp
For example the commands:
.Vb 3
smartctl \-t select,0\-999 /dev/sda
smartctl \-t select,next /dev/sda
smartctl \-t select,next+2000 /dev/sda
.Ve
have the same effect as:
.Vb 3
smartctl \-t select,0\-999 /dev/sda
smartctl \-t select,1000\-1999 /dev/sda
smartctl \-t select,2000\-3999 /dev/sda
.Ve
.Sp
If the last test ended at the last LBA of the disk, the new range starts
at LBA 0. The span size of the last span of a disk is adjusted such that
the total number of spans to check the full disk will not be changed
by future uses of \*(Aq\-t select,next\*(Aq.
.Sp
.I select,cont[+SIZE]
\- [ATA only] performs a \*(Aqredo\*(Aq (above) if the self test status
reports that the last test was aborted by the host.
Otherwise it run the \*(Aqnext\*(Aq (above) test.
.Sp
.I afterselect,on
\- [ATA only] perform an offline read scan after a Selective self-test
has completed. This option must be used together with one or more of
the \fIselect,N\-M\fP options above. If the LBAs that have been
specified in the Selective self-test pass the test with no errors
found, then read scan the \fBremainder\fP of the disk. If the device
is powered-cycled while this read scan is in progress, the read scan
will be automatically resumed after a time specified by the pending
timer (see below). The value of this option is preserved between
selective self-tests.
.Sp
.I afterselect,off
\- [ATA only] do not read scan the remainder of the disk after a
Selective self-test has completed. This option must be use together
with one or more of the \fIselect,N\-M\fP options above. The value of this
option is preserved between selective self-tests.
.Sp
.I pending,N
\- [ATA only] set the pending offline read scan timer to N minutes.
Here N is an integer in the range from 0 to 65535 inclusive. If the
device is powered off during a read scan after a Selective self-test,
then resume the test automatically N minutes after power-up. This
option must be use together with one or more of the \fIselect,N\-M\fP
options above.
The value of this option is preserved between selective self-tests.
.Sp
.I vendor,N
\- [ATA only] issues the ATA command SMART EXECUTE OFF-LINE IMMEDIATE
with subcommand N in LBA LOW register. The subcommand is specified as
a hex value in the range 0x00 to 0xff. Subcommands 0x40\(en0x7e and
0x90\(en0xff are reserved for vendor specific use, see table 61 of
T13/1699-D Revision 6a (ATA8-ACS). Note that the subcommands
0x00\(en0x04, 0x7f, 0x81\(en0x84 are supported by other smartctl options
(e.g.\& 0x01: \*(Aq\-t short\*(Aq, 0x7f: \*(Aq\-X\*(Aq, 0x82:
\*(Aq\-C \-t long\*(Aq).
.Sp
\fBWARNING: Only run subcommands documented by the vendor of the
device.\fP
.Sp
Example for some Intel SSDs only:
The subcommand 0x40 (\*(Aq\-t vendor,0x40\*(Aq) clears the timed workload
related SMART attributes (226, 227, 228). Note that the raw values of
these attributes are held at 65535 (0xffff) until the workload timer
reaches 60 minutes.
.Sp
.I force
\- start new self-test even if another test is already running.
By default a running self-test will not be interrupted to begin another
test.
.TP
.B \-C, \-\-captive
[ATA] Runs self-tests in captive mode. This has no effect with \*(Aq\-t
offline\*(Aq or if the \*(Aq\-t\*(Aq option is not used.
.Sp
\fBWARNING: Tests run in captive mode may busy out the drive for the
length of the test. Only run captive tests on drives without any
mounted partitions!\fP
.Sp
[SCSI] Runs the self-test in "Foreground" mode.
.TP
.B \-X, \-\-abort
Aborts non-captive SMART Self Tests. Note that this
command will abort the Offline Immediate Test routine only if your
disk has the "Abort Offline collection upon new command" capability.
.Sp
.SH ATA, SCSI command sets and SAT
In the past there has been a clear distinction between storage devices
that used the ATA and SCSI command sets. This distinction was often
reflected in their device naming and hardware. Now various SCSI
transports (e.g.\& SAS, FC and iSCSI) can interconnect to both SCSI
disks (e.g.\& FC and SAS) and ATA disks (especially SATA). USB and
IEEE 1394 storage devices use the SCSI command set externally but
almost always contain ATA or SATA disks (or flash). The storage
subsystems in some operating systems have started to remove the
distinction between ATA and SCSI in their device naming policies.
.PP
99% of operations that an OS performs on a disk involve the SCSI INQUIRY,
READ CAPACITY, READ and WRITE commands, or their ATA equivalents. Since
the SCSI commands are slightly more general than their ATA equivalents,
many OSes are generating SCSI commands (mainly READ and WRITE) and
letting a lower level translate them to their ATA equivalents as the
need arises. An important note here is that "lower level" may be in
external equipment and hence outside the control of an OS.
.PP
SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
specifies how this translation is done. For the other 1% of operations
that an OS performs on a disk, SAT provides two options. First is an
optional ATA PASS-THROUGH SCSI command (there are two variants).
The second is a translation from the closest SCSI command.
Most current interest is in the "pass-through" option.
.PP
The relevance to smartmontools (and hence smartctl) is that its
interactions with disks fall solidly into the "1%" category. So even
if the OS can happily treat (and name) a disk as "SCSI", smartmontools
needs to detect the native command set and act accordingly.
As more storage manufacturers (including external SATA drives) comply
with SAT, smartmontools is able to automatically distinguish the native
command set of the device.
In some cases the \*(Aq\-d sat\*(Aq option is needed on the command line.
.PP
There are also virtual disks which typically have no useful information
to convey to smartmontools, but could conceivably in the future. An
example of a virtual disk is the OS's view of a RAID 1 box. There are
most likely two SATA disks inside a RAID 1 box. Addressing those SATA
disks from a distant OS is a challenge for smartmontools. Another
approach is running a tool like smartmontools inside the RAID 1 box (e.g.
a Network Attached Storage (NAS) box) and fetching the logs via a
browser.
.Sp
.SH TAPE DRIVES
Commands for SCSI Tape drives as defined in the SSC\-4 standard (ANSI
INCITS 516\-2013). SSC stands for "SCSI Streaming Commands". Draft
standards can be found at <\fBhttps://www.t10.org/\fP> .
.PP
Many SMART related features of SCSI disks are shared by SCSI tape drives.
One important tape\-specific log page is called "TapeAlert" which is used
to report abnormal conditions. Unlike most other log pages the TapeAlert
log page
.B clears
pending alerts after that page is fetched (i.e. read from
the tape drive). To be more precise, the TapeAlert log page is cleared
for the I_T nexus (initiator-target pair) that sent the (SCSI LOG SENSE)
command; so another initiator (e.g. a HBA on another machine) will still
have pending alerts reported. [This clearing action can be controlled by
the TAPLSD bit is the [SSC] Device Configuration Extension mode page but
the original and default action remains: clear any pending TapeAlerts.
The sdparm utility can be used to access and change TAPLSD.]
.PP
Previous versions of smartctl have supported polling the TapeAlert log
page when the \-\-health option is given. This clearing of pending alerts
has created problems for other tape\-specific tools. This version of
smartctl will only fetch the TapeAlert log page if the \-\-health option
is given
.B twice
in the command line invocation (or the \-\-log=tapealert option is given).
.PP
There are other tape\-specific log pages such as \-\-log=tapedevstat
that behave normally (i.e. they don't change any state information in
the tape drive).
.Sp
.SH EXAMPLES
.B smartctl \-a /dev/sda
.br
Print a large amount of SMART information for drive /dev/sda.
.PP
.B smartctl \-s off /dev/sdd
.br
Disable SMART monitoring and data log collection on drive /dev/sdd.
.PP
.B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/sda
.br
Enable SMART on drive /dev/sda, enable automatic offline
testing every four hours, and enable autosaving of
SMART Attributes. This is a good start-up line for your system's
init files. You can issue this command on a running system.
.PP
.B smartctl \-t long /dev/sdc
.br
Begin an extended self-test of drive /dev/sdc. You can issue this
command on a running system. The results can be seen in the self-test
log visible with the \*(Aq\-l selftest\*(Aq option after it has completed.
.PP
.B smartctl \-s on \-t offline /dev/sda
.br
Enable SMART on the disk, and begin an immediate offline test of
drive /dev/sda. You can issue this command on a running system. The
results are only used to update the SMART Attributes, visible
with the \*(Aq\-A\*(Aq option. If any device errors occur, they are logged to
the SMART error log, which can be seen with the \*(Aq\-l error\*(Aq option.
.PP
.B smartctl \-A \-v 9,minutes /dev/sda
.br
Shows the vendor Attributes, when the disk stores its power-on time
internally in minutes rather than hours.
.PP
.B smartctl \-q errorsonly \-H \-l selftest /dev/sda
.br
Produces output only if the device returns failing SMART status,
or if some of the logged self-tests ended with errors.
.PP
.B smartctl \-q silent \-a /dev/sda
.br
Examine all SMART data for device /dev/sda, but produce no
printed output. You must use the exit status (the
.B $?
shell variable) to learn if any Attributes are out of bound, if the
SMART status is failing, if there are errors recorded in the
self-test log, or if there are errors recorded in the disk error log.
.PP
.B smartctl \-a \-d 3ware,0 /dev/twl0
.br
Examine all SMART data for the first SATA (not SAS) disk connected to a
3ware RAID 9750 controller card.
.PP
.B smartctl \-t long \-d areca,4 /dev/sg2
.br
Start a long self-test on the fourth SATA disk connected to an Areca RAID
controller addressed by /dev/sg2.
.PP
.B smartctl \-a \-d hpt,1/3 /dev/sda (under Linux)
.br
.B smartctl \-a \-d hpt,1/3 /dev/hptrr (under FreeBSD)
.br
Examine all SMART data for the (S)ATA disk directly connected to the third
channel of the first HighPoint RocketRAID controller card.
.PP
.B smartctl \-t short \-d hpt,1/1/2 /dev/sda (under Linux)
.br
.B smartctl \-t short \-d hpt,1/1/2 /dev/hptrr (under FreeBSD)
.br
Start a short self-test on the (S)ATA disk connected to second pmport on the
first channel of the first HighPoint RocketRAID controller card.
.PP
.B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/sda
.br
Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the
these LBAs have been tested, read-scan the remainder of the disk.
If the disk is power-cycled during the read-scan, resume the scan 45 minutes
after power to the device is restored.
.PP
.B smartctl \-a \-d cciss,0 /dev/cciss/c0d0
.br
Examine all SMART data for the first SCSI disk connected to a cciss
RAID controller card.
.Sp
.SH EXIT STATUS
The exit statuses of \fBsmartctl\fP are defined by a bitmask.
If all is well with the disk, the exit status (return value) of
\fBsmartctl\fP is 0 (all bits turned off). If a problem occurs, or an
error, potential error, or fault is detected, then a non-zero status
is returned. In this case, the eight different bits in the exit status
have the following meanings for ATA disks; some of these values
may also be returned for SCSI disks.
.TP
.B Bit 0:
Command line did not parse.
.TP
.B Bit 1:
Device open failed, device did not return an IDENTIFY DEVICE structure,
or device is in a low-power mode (see \*(Aq\-n\*(Aq option above).
.TP
.B Bit 2:
Some SMART or other ATA command to the disk failed, or there was a checksum
error in a SMART data structure (see \*(Aq\-b\*(Aq option above).
.TP
.B Bit 3:
SMART status check returned "DISK FAILING".
.TP
.B Bit 4:
We found prefail Attributes <= threshold.
.TP
.B Bit 5:
SMART status check returned "DISK OK" but we found that some (usage
or prefail) Attributes have been <= threshold at some time in the
past.
.TP
.B Bit 6:
The device error log contains records of errors.
.TP
.B Bit 7:
The device self-test log contains records of errors.
[ATA only] Failed self-tests outdated by a newer successful extended
self-test are ignored.
.PP
To test within the shell for whether or not the different bits are
turned on or off, you can use the following type of construction
(which should work with any POSIX compatible shell):
.br
.B smartstat=$(($? & 8))
.br
This looks at only at bit 3 of the exit status
.B $?
(since 8=2^3). The shell variable
$smartstat will be nonzero if SMART status check returned "disk
failing" and zero otherwise.
.PP
This shell script prints all status bits:
.Vb 5
val=$?; mask=1
for i in 0 1 2 3 4 5 6 7; do
echo "Bit $i: $(((val & mask) && 1))"
mask=$((mask << 1))
done
.Ve
.Sp
.\" %IF NOT OS Windows
.SH FILES
.TP
.B /usr/local/sbin/smartctl
full path of this executable.
.\" %IF ENABLE_DRIVEDB
.TP
.B /usr/local/var/lib/smartmontools/drivedb.h
drive database (see \*(Aq\-B\*(Aq option).
.\" %ENDIF ENABLE_DRIVEDB
.TP
.B /usr/local/etc/smart_drivedb.h
optional local drive database (see \*(Aq\-B\*(Aq option).
.Sp
.\" %ENDIF NOT OS Windows
.SH AUTHORS
\fBBruce Allen\fP (project initiator),
.br
\fBChristian Franke\fP (project manager, Windows port and all sort of things),
.br
\fBDouglas Gilbert\fP (SCSI subsystem),
.br
\fBVolker Kuhlmann\fP (moderator of support and database mailing list),
.br
\fBGabriele Pohl\fP (wiki & development team support),
.br
\fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki).
.PP
Many other individuals have made contributions and corrections,
see AUTHORS, ChangeLog and repository files.
.PP
The first smartmontools code was derived from the smartsuite package,
written by Michael Cornwell and Andre Hedrick.
.Sp
.SH REPORTING BUGS
To submit a bug report, create a ticket in smartmontools wiki:
.br
<\fBhttps://www.smartmontools.org/\fP>.
.br
Alternatively send the info to the smartmontools support mailing list:
.br
<\fBhttps://listi.jpberlin.de/mailman/listinfo/smartmontools-support\fB>.
.Sp
.SH SEE ALSO
\fBsmartd\fP(8).
.\" %IF ENABLE_UPDATE_SMART_DRIVEDB
.br
\fBupdate-smart-drivedb\fP(8).
.\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
.Sp
.SH REFERENCES
Please see the following web site for more info:
<\fBhttps://www.smartmontools.org/\fP>
.PP
An introductory article about smartmontools is \fIMonitoring Hard
Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
pages 74\(en77.
See <\fBhttps://www.linuxjournal.com/article/6983\fP>.
.PP
If you would like to understand better how SMART works, and what it
does, a good place to start is with Sections 4.8 and 6.54 of the first
volume of the \*(AqAT Attachment with Packet Interface-7\*(Aq (ATA/ATAPI-7)
specification Revision 4b. This documents the SMART functionality which the
\fBsmartmontools\fP utilities provide access to.
.PP
The functioning of SMART was originally defined by the SFF-8035i
revision 2 and the SFF-8055i revision 1.4 specifications. These are
publications of the Small Form Factors (SFF) Committee.
.PP
Links to these and other documents may be found on the Links page of the
\fBsmartmontools\fP Wiki at <\fBhttps://www.smartmontools.org/wiki/Links\fP>.
.Sp
.SH PACKAGE VERSION
CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
.br
$Id: smartctl.8.in 5521 2023-07-24 16:44:49Z chrfranke $
|