Solve: A Simple Menu-Based NVMe Checker for Raspberry Pi


Solve: A Simple Menu-Based NVMe Checker for Raspberry Pi








This lightweight script nvme_check_menu.sh gives Raspberry Pi users a quick way to check if their NVMe SSD is connected and behaving as expected—without hunting down obscure commands. It’s perfect for headless setups, Pi 4 or Pi 5 boards, and those using NVMe HATs or adapters.

The script uses a plain terminal menu with three simple options. It logs everything it finds to a file called nvme_session.log.

Here’s what you see when it starts: 

Bash
*** Raspberry Pi NVMe Diagnostic Tool ***
1. Run Full NVMe Check
2. View Session Log
3. Quit
Select an option (1-3):   

If no NVMe device is attached, it will detect that and skip tests automatically: 

Bash
--- nvme list ---
Node  Generic  SN  Model  Namespace  Usage  Format  FW Rev
----------------------------------------------------------
No NVMe device detected. Skipping SMART and dd tests.  

If a drive is detected, Option 1 performs:
  • Device detection via nvme list
  • Recent kernel log output (dmesg)
  • SMART health data
  • TRIM support check
  • 100MB write test using dd
  • 100MB read test from the same file
  • Log creation and cleanup

Option 2 displays the log directly in your terminal for easy review.


How to Use It

Before running the script, make sure the nvme-cli tool is installed: 

Bash
sudo apt update   

Bash
sudo apt install nvme-cli   

Then make the script executable: 

Bash
chmod +x nvme_check_menu.sh 

Now launch the script:

Bash
./nvme_check_menu.sh 


Conclusion

The tool doesn't optimize anything. It just gives you a snapshot—quick, quiet, and respectful of your setup. Think of it as a warm-up jog for your SSD.


Download the script and README


Need Raspberry Pi Expertise?

We'd love to help you with your Raspberry Pi projects.  Feel free to reach out to us at info@pacificw.com.


Written by Aaron Rose, software engineer and technology writer at Tech-Reader.blog.

Comments

Popular posts from this blog

The New ChatGPT Reason Feature: What It Is and Why You Should Use It

Raspberry Pi Connect vs. RealVNC: A Comprehensive Comparison

The Reasoning Chain in DeepSeek R1: A Glimpse into AI’s Thought Process