]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
Added DITT explanation and cleaned up spacing
authorBrandon <bjpaupor@gmail.com>
Wed, 24 Jun 2020 15:28:50 +0000 (08:28 -0700)
committerKeith Busch <kbusch@kernel.org>
Tue, 30 Jun 2020 17:31:53 +0000 (11:31 -0600)
Documentation/nvme-wdc-vs-temperature-stats.1
Documentation/nvme-wdc-vs-temperature-stats.html
Documentation/nvme-wdc-vs-temperature-stats.txt
plugins/wdc/wdc-nvme.c

index 9d540295be10690059cc1a8eee8e1e26e1628afc..3fafdb21cb9e8116ead64d8f78974d30d42f9f15 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: nvme-wdc-vs-temperature-stats
 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 06/23/2020
+.\"      Date: 06/24/2020
 .\"    Manual: NVMe Manual
 .\"    Source: NVMe
 .\"  Language: English
 .\"
-.TH "NVME\-WDC\-VS\-TEMPE" "1" "06/23/2020" "NVMe" "NVMe Manual"
+.TH "NVME\-WDC\-VS\-TEMPE" "1" "06/24/2020" "NVMe" "NVMe Manual"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -87,10 +87,10 @@ temp of critical overheating
 T}
 T{
 .sp
-DITT support status
+Device Initiated Thermal Throttling support status
 T}:T{
 .sp
-0 = unsupported
+0 = unsupported, 1 = supported
 T}
 T{
 .sp
index 745ac737c538bd1a0efba615ee96d50199e4b3a1..32801315b01d19a765b9c065e0965d262ded2f35 100644 (file)
@@ -789,8 +789,8 @@ cellspacing="0" cellpadding="4">
 <td align="left" valign="top"><p class="table">temp of critical overheating</p></td>\r
 </tr>\r
 <tr>\r
-<td align="left" valign="top"><p class="table">DITT support status</p></td>\r
-<td align="left" valign="top"><p class="table">0 = unsupported</p></td>\r
+<td align="left" valign="top"><p class="table">Device Initiated Thermal Throttling support status</p></td>\r
+<td align="left" valign="top"><p class="table">0 = unsupported, 1 = supported</p></td>\r
 </tr>\r
 <tr>\r
 <td align="left" valign="top"><p class="table">Host Controlled Thermal Management support</p></td>\r
@@ -857,7 +857,7 @@ Displays the temperature stats for the device:
 <div id="footer">\r
 <div id="footer-text">\r
 Last updated\r
- 2020-06-23 14:49:59 CDT\r
+ 2020-06-24 08:15:01 PDT\r
 </div>\r
 </div>\r
 </body>\r
index 03a918bab7557e1e1cbe76bfad69d86d14a31392..1d000e30374f210a4ad67e03bdbbfafe390eda4d 100644 (file)
@@ -35,8 +35,8 @@ Expected status and description :-
 |Critical Composite TEMPerature threshold
 |temp of critical overheating
 
-|DITT support status
-|0 = unsupported
+|Device Initiated Thermal Throttling support status
+|0 = unsupported, 1 = supported
 
 |Host Controlled Thermal Management support
 |0 = unsupported, 1 = supported
index 63454630b060b493b06746b32f6345ae70612485..7dbece9a366aef0799994f4dbd59926c2a7d08fd 100644 (file)
@@ -19,7 +19,7 @@
  *   Author: Chaitanya Kulkarni <chaitanya.kulkarni@hgst.com>,
  *           Dong Ho <dong.ho@hgst.com>,
  *           Jeff Lien <jeff.lien@wdc.com>
- *                      Brandon Paupore <brandon.paupore@wdc.com>
+ *          Brandon Paupore <brandon.paupore@wdc.com>
  */
 #include <stdio.h>
 #include <string.h>
@@ -6554,9 +6554,9 @@ static int wdc_vs_temperature_stats(int argc, char **argv,
 {
        const char *desc = "Send a vs-temperature-stats command.";
        struct nvme_smart_log smart_log;
-    struct nvme_id_ctrl id_ctrl;
+       struct nvme_id_ctrl id_ctrl;
        uint64_t capabilities = 0;
-    __u32 hctm_tmt;
+       __u32 hctm_tmt;
        int fd, ret;
 
        OPT_ARGS(opts) = {
@@ -6575,40 +6575,40 @@ static int wdc_vs_temperature_stats(int argc, char **argv,
                return -1;
        } 
 
-    /* get the temperature stats or report errors */
+       /* get the temperature stats or report errors */
        ret = nvme_identify_ctrl(fd, &id_ctrl);
-    if (ret != 0)
+       if (ret != 0)
                goto END;
        ret = nvme_smart_log(fd, NVME_NSID_ALL, &smart_log);
-    if (ret != 0) 
-       goto END;
+       if (ret != 0) 
+               goto END;
 
-    /* print the temperature stats */
-    printf("Temperature Stats for NVME device:%s namespace-id:%x\n",
-            devicename, WDC_DE_GLOBAL_NSID);
+       /* print the temperature stats */
+       printf("Temperature Stats for NVME device:%s namespace-id:%x\n",
+               devicename, WDC_DE_GLOBAL_NSID);
 
-    /* convert from Kelvin to degrees Celsius */
+       /* convert from Kelvin to degrees Celsius */
        int temperature = ((smart_log.temperature[1] << 8) | smart_log.temperature[0]) - 273;
        printf("Current Composite Temperature           : %d °C\n", temperature);
-    printf("WCTEMP                                  : %"PRIu16" °C\n", id_ctrl.wctemp - 273);
+       printf("WCTEMP                                  : %"PRIu16" °C\n", id_ctrl.wctemp - 273);
        printf("CCTEMP                                  : %"PRIu16" °C\n",  id_ctrl.cctemp - 273);
-    printf("DITT support                            : 0\n");
-    printf("HCTM support                            : %"PRIu16"\n", id_ctrl.hctma);
+       printf("DITT support                            : 0\n");
+       printf("HCTM support                            : %"PRIu16"\n", id_ctrl.hctma);
 
        /* retrieve HCTM Thermal Management Temperatures */
-    nvme_get_feature(fd, 0, 0x10, 0, 0, 0, 0, &hctm_tmt);
-    temperature = ((hctm_tmt >> 16) & 0xffff) ? ((hctm_tmt >> 16) & 0xffff) - 273 : 0; 
+       nvme_get_feature(fd, 0, 0x10, 0, 0, 0, 0, &hctm_tmt);
+       temperature = ((hctm_tmt >> 16) & 0xffff) ? ((hctm_tmt >> 16) & 0xffff) - 273 : 0;      
        printf("HCTM Light (TMT1)                       : %"PRIu16" °C\n", temperature);
-    printf("TMT1 Transition Counter                 : %"PRIu32"\n", smart_log.thm_temp1_trans_count);
+       printf("TMT1 Transition Counter                 : %"PRIu32"\n", smart_log.thm_temp1_trans_count);
        printf("TMT1 Total Time                         : %"PRIu32"\n", smart_log.thm_temp1_total_time);
 
-    temperature = (hctm_tmt & 0xffff) ? (hctm_tmt & 0xffff) - 273 : 0; 
+       temperature = (hctm_tmt & 0xffff) ? (hctm_tmt & 0xffff) - 273 : 0;      
        printf("HCTM Heavy (TMT2)                       : %"PRIu16" °C\n", temperature);
-    printf("TMT2 Transition Counter                 : %"PRIu32"\n", smart_log.thm_temp2_trans_count);
-    printf("TMT2 Total Time                         : %"PRIu32"\n", smart_log.thm_temp2_total_time);
-    printf("Thermal Shutdown Threshold              : 95 °C\n");      
+       printf("TMT2 Transition Counter                 : %"PRIu32"\n", smart_log.thm_temp2_trans_count);
+       printf("TMT2 Total Time                         : %"PRIu32"\n", smart_log.thm_temp2_total_time);
+       printf("Thermal Shutdown Threshold              : 95 °C\n");   
        
-    END:
+       END:
        fprintf(stderr, "NVMe Status:%s(%x)\n", nvme_status_to_string(ret), ret);
        return ret;
 }