From: Erwan Velu Date: Sun, 26 Sep 2021 20:26:27 +0000 (+0200) Subject: one-core-peak: Reporting NVME features X-Git-Tag: fio-3.29~90^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b1297bd21cff542cc27713ac65704a3e80273756;p=fio.git one-core-peak: Reporting NVME features This commit get some low-level features of NVME drives and report them. It includes, temperature, apste, power state and submission & completion queues A typical output looks like : nvme0n1: MODEL=Samsung SSD 970 EVO Plus 2TB FW=2B2QEXM7 serial=S59CNM0R417706B PCI=0000:01:00.0@8.0 GT/s PCIe IRQ=62 NUMA=0 CPUS=0-31 nvme0n1: Temp:34 C, Autonomous Power State Transition: Enabled, PowerState:4, Completion Queues:32, Submission Queues:32 Signed-off-by: Erwan Velu --- diff --git a/t/one-core-peak.sh b/t/one-core-peak.sh index 8d1e95f0..c3b0c550 100755 --- a/t/one-core-peak.sh +++ b/t/one-core-peak.sh @@ -174,6 +174,7 @@ check_idle_governor() { } show_nvme() { + device="$1" device_name=$(block_dev_name $1) device_dir="/sys/block/${device_name}/device/" pci_addr=$(cat ${device_dir}/address) @@ -186,6 +187,12 @@ show_nvme() { fw=$(cat ${device_dir}/firmware_rev | xargs) #xargs for trimming spaces serial=$(cat ${device_dir}/serial | xargs) #xargs for trimming spaces info ${device_name} "MODEL=${model} FW=${fw} serial=${serial} PCI=${pci_addr}@${link_speed} IRQ=${irq} NUMA=${numa} CPUS=${cpus} " + NCQA=$(nvme get-feature -H -f 0x7 ${device} |grep NCQA |cut -d ':' -f 2 | xargs) + NSQA=$(nvme get-feature -H -f 0x7 ${device} |grep NSQA |cut -d ':' -f 2 | xargs) + power_state=$(nvme get-feature -H -f 0x2 ${device} | grep PS |cut -d ":" -f 2 | xargs) + apste=$(nvme get-feature -H -f 0xc ${device} | grep APSTE |cut -d ":" -f 2 | xargs) + temp=$(nvme smart-log ${device} |grep 'temperature' |cut -d ':' -f 2 |xargs) + info ${device_name} "Temp:${temp}, Autonomous Power State Transition:${apste}, PowerState:${power_state}, Completion Queues:${NCQA}, Submission Queues:${NSQA}" } show_device() { @@ -231,7 +238,7 @@ show_system() { ### MAIN check_args ${args} check_root -check_binary t/io_uring lscpu grep taskset cpupower awk tr xargs dmidecode +check_binary t/io_uring lscpu grep taskset cpupower awk tr xargs dmidecode nvme detect_first_core info "##################################################"