}
show_nvme() {
+ device="$1"
device_name=$(block_dev_name $1)
device_dir="/sys/block/${device_name}/device/"
pci_addr=$(cat ${device_dir}/address)
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() {
### 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 "##################################################"