From 5b8a9f6e035709454cb43e5f9661b3d110a0ea5c Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 20 Dec 2024 20:52:13 +0100 Subject: [PATCH] feat(snippets): start noting down smartctl commands --- snippets/smartctl.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 snippets/smartctl.sh diff --git a/snippets/smartctl.sh b/snippets/smartctl.sh new file mode 100644 index 0000000..9cf0f95 --- /dev/null +++ b/snippets/smartctl.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +# start tests +sudo smartctl -t 'long' '/dev/sda' +sudo smartctl --type 'short' '/dev/nvme0' + +# show devices' SMART health status +sudo smartctl -H '/dev/sda' +sudo smartctl --health '/dev/nvme0' + +# print self-tests' results +sudo smartctl -l 'selftest' '/dev/nvme0' + +# print results for self-tests and attribute errors +smartctl --attributes --log='selftest' --quietmode='errorsonly' '/dev/sda'