2025-4-2的文章 《希望能够直观的看到硬盘的 读写寿命》
2025-6-30的文章《硬盘信息,SMART,增加读写数据量》
感觉、估计、大概是 飞牛开发团队永远也不可能响应吧,但是这个功能,真的在debian本身就自带,就是smartmontools嘛。但是只能无奈,我写了一个简单的html给大家,大概功能如图

真不是神仙,真看不出来这个数据是读写了多少T,所以写了一个简单的计算器。
下面直接给html代码
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>固态硬盘SMART读写数据计算器</title>
<style>
body{font-family:Arial,sans-serif;max-width:600px;margin:50px auto;padding:20px;background:#f5f5f5;}
.container{background:white;padding:30px;border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,0.1);}
h1{font-size:26px;color:#333;margin-bottom:30px;}
.input-group{margin-bottom:20px;}
label{display:block;margin-bottom:5px;font-weight:bold;color:#555;}
input{width:100%;padding:10px;border:2px solid #ddd;border-radius:5px;font-size:16px;box-sizing:border-box;}
input:focus{border-color:#4CAF50;outline:none;}
button{width:100%;padding:12px;background:#4CAF50;color:white;border:none;border-radius:5px;font-size:16px;cursor:pointer;}
button:hover{background:#45a049;}
.result{margin-top:20px;padding:10px 20px 8px 20px;background:#f9f9f9;border-radius:5px;border-left:4px solid #4CAF50;display:none;}
.result h3{margin-top:0;color:#333;}
.result-item{margin:10px 0;font-size:16px;}
.note{margin-top:20px;padding:20px 20px 5px 20px;background:#e7f3ff;border-radius:5px;border-left:4px solid #2196F3;font-size:14px;color:#333;}
.note ul{list-style:none;padding:0px;line-height:2;}
</style>
</head>
<body>
<div class="container">
<h1>固态硬盘SMART读写数据计算器</h1>
<div class="input-group">
<label for="read">读取单位计数 (Data Units Read)</label>
<input type="number" id="read" placeholder="请输入数值" min="0">
</div>
<div class="input-group">
<label for="write">写入单位计数 (Data Units Written)</label>
<input type="number" id="write" placeholder="请输入数值" min="0">
</div>
<button onclick="calculate()">计算硬盘读写量</button>
<div id="result" class="result">
<div class="result-item"><strong>硬盘读取量:</strong> <span id="readResult"></span></div>
<div class="result-item"><strong>硬盘写入量:</strong> <span id="writeResult"></span></div>
</div>
<div class="note">
<strong>计算说明:</strong>
<ul>
<li>每个Data Unit = 512,000 bytes</li>
<li>使用十进制TB:1 TB = 1,000,000,000,000 bytes</li>
<li>计算公式: TB = (Data Units × 512,000) ÷ 1,000,000,000,000</li>
</ul>
</div>
<div class="note">
<strong>目前TLC颗粒固态硬盘寿命参考:</strong>
<ul>
<li>128G = 75TBW</li>
<li>256G = 150TBW</li>
<li>512G = 300TBW</li>
<li>1TB = 600TBW</li>
<li>2TB = 1200TBW</li>
<li>4TB = 2400TBW</li>
</ul>
</div>
</div>
<script>
function calculate() {
const read = parseFloat(document.getElementById('read').value) || 0;
const write = parseFloat(document.getElementById('write').value) || 0;
if (read < 0 || write < 0) {
**('请输入有效数值');
return;
}
const bytesPerUnit = 512000;
const bytesPerTB = 1e12;
document.getElementById('readResult').textContent = formatSize(read * bytesPerUnit / bytesPerTB);
document.getElementById('writeResult').textContent = formatSize(write * bytesPerUnit / bytesPerTB);
document.getElementById('result').style.display = 'block';
}
function formatSize(tb) {
if (tb >= 1) return tb.toFixed(2) + ' TB';
if (tb >= 0.001) return (tb * 1000).toFixed(2) + ' GB';
if (tb >= 0.000001) return (tb * 1000000).toFixed(2) + ' MB';
return (tb * 1000000000).toFixed(2) + ' KB';
}
document.addEventListener('keypress', e => e.key === 'Enter' && calculate());
</script>
</body>
</html>
复制上面的代码,保存为 smart.html 即可使用
我知道,飞牛开启ssh,使用终端连上ssh,通过命令 smartctl -a /dev/nvme0n1 就能查这些信息了,然后再在飞牛里关闭ssh,但是有时候,开启ssh后会忘记去关掉。
所以,写了个简单的网页计算器,感觉是等不到飞牛能自带这个功能,也有可能飞牛感知不到这个需求的意义吧。
仅仅是对固态硬盘理论寿命使用能有一个了解,有同样需求的朋友可以保存使用。