yongseokoh / nvme_exporter

14 stars 9 forks source link

nvme0 failed to map. Did your kernel enable CONFIG_IO_STRICT_DEVMEM? #4

Closed Kontr3X closed 2 years ago

Kontr3X commented 2 years ago
$ python3 nvme_exporter.py -p 9900 -u 5
DevicePath /dev/nvme0n1
Firmware AAGA4106
Index 0
ModelNumber KXG50ZNV512G TOSHIBA
ProductName Non-Volatile memory controller: Toshiba Corporation Device 0x0116
SerialNumber 48TS10BVTYST
UsedBytes 512110190592
MaximumLBA 1000215216
PhysicalSize 512110190592
SectorSize 512
DevicePath /dev/nvme1n1
Firmware AAGA4106
Index 1
ModelNumber KXG50ZNV512G TOSHIBA
ProductName Non-Volatile memory controller: Toshiba Corporation Device 0x0116
SerialNumber 48TS10EFTYST
UsedBytes 512110190592
MaximumLBA 1000215216
PhysicalSize 512110190592
SectorSize 512
critical_warning 0
temperature 301
avail_spare 100
spare_thresh 10
percent_used 184
data_units_read 111876632
data_units_written 696554113
host_read_commands 1085544532
host_write_commands 6859327382
controller_buys_time 150201
power_cycles 52
power_on_hours 29698
unsafe_shutdowns 11
media_errors 0
num_err_log_entries 0
warning_temp_time 0
critical_comp_tim 0
thm_temp1_trans_count 0
thm_temp2_trans_count 0
thm_temp1_total_time 0
thm_temp2_total_time 0
critical_warning 0
temperature 303
avail_spare 100
spare_thresh 10
percent_used 222
data_units_read 38569398
data_units_written 857159522
host_read_commands 494702158
host_write_commands 8540271356
controller_buys_time 242229
power_cycles 17
power_on_hours 30237
unsafe_shutdowns 2
media_errors 0
num_err_log_entries 0
warning_temp_time 0
critical_comp_tim 0
thm_temp1_trans_count 0
thm_temp2_trans_count 0
thm_temp1_total_time 0
thm_temp2_total_time 0
nvme0 failed to map. Did your kernel enable CONFIG_IO_STRICT_DEVMEM?
Traceback (most recent call last):
  File "/opt/node_exporter/nvme_exporter/nvme_exporter.py", line 184, in <module>
    main()
  File "/opt/node_exporter/nvme_exporter/nvme_exporter.py", line 176, in main
    gather_nvme_ctrl_info(nvme_ctrl_gauge, nvme_list_json)
  File "/opt/node_exporter/nvme_exporter/nvme_exporter.py", line 106, in gather_nvme_ctrl_info
    ctrl_json = nc.get_ctrl_regs(device)
  File "/opt/node_exporter/nvme_exporter/nvme_ctrl.py", line 16, in get_ctrl_regs
    json_data = json.loads(stdout)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Kontr3X commented 2 years ago

Seems like it is more a "feature", not a bug. But maybe the overviews that belongs to it should be "optionally" by the fact that it has become standard.