Follow

It's now possible to get some NVMe controller/namespace information on using bioctl(8).

krw@ modified src/sys/dev/ic/{nvme.c nvmereg.h,nvmevar.h}: Add bio(4) support to nvme(4). Provide information on controller and configured namespaces via bioctl(8)'s BIOCINQ, BIOCVOL, BIOCDISK requests.

Based on work with dlg@ at h2k23 and many subsequent improvements and tests by jmatthew@.

ok jmatthew@

e.g:

$ doas bioctl nvme0

nvme0: APPLE SSD AP0512Q, 359.60.3, 0ba0146283356426
nvme0: Max i/o 131072 bytes, Volatile Write Cache
nvme0: Commands FWCD,SDMGMT
nvme0: NVMe 1.1, NVM I/O command set, Enabled, Ready
Volume Status Size Device
nvme0 0 Online 500277792768 sd0 CONCAT
0: Formats *4096 (Best)
0 Online 500277792768 0:1.0 Namespace 1 <>

Some useful NVMe SMART data, like temperature, available spare sectors, device endurance, is now exposed in 's sensors sysctl(8) framework.

jmatthew@ modified src/sys/dev/ic/nvme*: Add sensors based on information in the SMART/health log page, showing overall device health and temperature.

tested by many (a while ago)
tweaks from gkoehler@ kettenis@ dv@
ok kettenis@ jca@ (earlier version), dlg@

@brynet I'm anxiously awaiting this to land in github so I can fetch it with got!

Sign in to participate in the conversation
BSD Network

bsd.network is a *BSD-adjacent Mastodon Instance. We have a code of conduct.