-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
syscheck.sh
26 lines (24 loc) · 1.25 KB
/
syscheck.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
VER=1.0
#---------------------------------------------------------------#
# Syscheck by Teqno #
# #
# Lists the relevant S.M.A.R.T status on installed hdds #
# and the CPU temp in a clear way. #
# #
#--[ Script Start ]---------------------------------------------#
echo "----------------------------- Regular Controller ------------------------------"
for disk in `lsblk | grep "0 disk" | tr -s ' ' '-' | awk -F '-' '{print $1}'`
do
echo
echo "`smartctl -i /dev/$disk | grep "Device Model:"` - `smartctl -i /dev/$disk | grep "User Capacity:"`"
echo "`smartctl -i /dev/$disk | grep "Serial Number:"`"
echo "HDD: /dev/$disk - Health:`smartctl -H /dev/$disk | grep "test result:" | awk -F ':' '{print $2}'` - TEMP: "`smartctl -A /dev/$disk | grep "Temperature" | awk '{print $10}' | uniq`"ºc"
smartctl -A /dev/$disk | grep "Reallocated_Sector_Ct"
smartctl -A /dev/$disk | grep "Current_Pending_Sector"
done
echo
echo "----------------------------------- CPU Temp -----------------------------------"
echo
sensors
exit 0