1
0
mirror of https://github.com/byReqz/stocheck.git synced 2024-11-22 14:41:15 +00:00
stocheck/README.md

89 lines
2.6 KiB
Markdown
Raw Normal View History

2021-01-22 21:48:34 +00:00
# stocheck
quick and dirty smart value checker
2021-01-22 22:07:39 +00:00
### features:
- sata/nvme support
- show smart info and self-check results
2021-01-24 00:55:57 +00:00
<br>
2021-01-25 22:20:31 +00:00
supports most common raid-controller brands (but not all models): <br>
2021-01-24 00:56:28 +00:00
- 3ware (series 6000, 7000, 8000, 9000 and 9750) <br>
- adaptec (smartraid/aacraid not yet implemented) <br>
- lsi/dell <br>
2021-01-22 22:07:39 +00:00
2021-05-15 18:28:47 +00:00
### known issues:
- showing all attributes for raid controllers fails via SSH
- Dell/LSI controllers in IT/HBA mode fail
2021-03-18 20:16:03 +00:00
# contributing
As different drives have different arguments, there are always ones which im gonna miss out on. Please submit smart arguments that you think to be missing as issue or merge request.
2021-01-22 22:07:39 +00:00
# usage
Usage: stocheck (options) <br>
Options: <br>
-h/--help -- show help <br>
-u/--update -- update the script <br>
2021-01-23 00:03:20 +00:00
### **running it on a remote machine:**
2021-04-01 09:41:29 +00:00
**running from the local file (can be automated with cron):**
2021-01-22 23:43:03 +00:00
```bash
ssh root@remote 'bash -s' < stocheck.sh
```
2021-04-01 09:41:29 +00:00
or
**running directly from github**
```bash
ssh root@remote "curl -s "https://raw.githubusercontent.com/byReqz/stocheck/main/stocheck.sh" | bash"
```
2021-01-23 00:03:20 +00:00
**proper alias:**
```bash
2021-04-01 09:41:29 +00:00
echo "function stocheck_remote { ssh root@'$'1 'bash -s' < ~/stocheck.sh; }" >> ~/.bashrc
2021-01-23 00:03:20 +00:00
echo "alias stocheck=stocheck_remote" >> ~/.bashrc
```
2021-01-22 22:07:39 +00:00
# installation
1. download the script: <br>
```bash
wget https://git.byreqz.de/byreqz/stocheck/raw/branch/main/stocheck.sh
```
2. run it with <br>
2021-01-22 23:43:49 +00:00
```bash
2021-01-22 22:07:39 +00:00
bash stocheck.sh
2021-01-22 23:43:49 +00:00
```
2021-01-22 22:07:39 +00:00
or <br>
2021-01-22 23:43:49 +00:00
```bash
2021-01-22 22:07:39 +00:00
chmod +x stockheck.sh && ./stocheck.sh
2021-01-22 23:43:49 +00:00
```
2021-01-22 22:07:39 +00:00
3. optionally alias it <br>
2021-01-22 23:43:49 +00:00
```bash
alias stocheck="~/stocheck.sh"
```
2021-02-15 14:18:51 +00:00
# sample output
```bash
2021-05-16 14:46:18 +00:00
=== sata drive check: (1 found) ===
2021-02-15 14:18:51 +00:00
------------------- /dev/sda --------------------
=== START OF INFORMATION SECTION ===
2021-05-16 14:46:18 +00:00
Device Model: INTEL XXXXXXXX
Serial Number: XXXXXXXXXXXXX
Firmware Version: XXXX
2021-02-15 14:18:51 +00:00
User Capacity: 240.057.409.536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF SELF-ASSESSMENT TEST RESULT ===
SMART overall-health self-assessment test result: PASSED
2021-05-16 14:46:18 +00:00
Attribute Value (Raw) Worst Thresh Type Updated Failed
Reallocated_Sector_Ct 100 (0) 100 000 Old_age Always -
Power_On_Hours 100 (1991) 100 000 Old_age Always -
Power_Cycle_Count 100 (2332) 100 000 Old_age Always -
Reported_Uncorrect 100 (1) 100 000 Old_age Always -
Temperature_Celsius 026 (26) 100 000 Old_age Always -
Media_Wearout_Indicator 080 (0) 100 000 Old_age Always -
2021-02-15 14:18:51 +00:00
-------------------------------------------------
```