GMETRIC="/usr/bin/gmetric -c /etc/ganglia/gmond.conf"
DEV=/dev/sda
temperature=$(sudo smartctl -A $DEV | grep Temperature_Celsius | awk '{print $10}')
Reallocated_Sector_Ct=$(sudo smartctl -A $DEV | grep Reallocated_Sector_Ct | awk '{print $10}')
Current_Pending_Sector=$(sudo smartctl -A $DEV | grep Current_Pending_Sector | awk '{print $10}')
Offline_Uncorrectable=$(sudo smartctl -A $DEV | grep Offline_Uncorrectable | awk '{print $10}')
UDMA_CRC_Error_Count=$(sudo smartctl -A $DEV | grep UDMA_CRC_Error_Count | awk '{print $10}')
Program_Fail_Count_Chip=$(sudo smartctl -A $DEV | grep Program_Fail_Count_Chip | awk '{print $10}')
Erase_Fail_Count_Chip=$(sudo smartctl -A $DEV | grep Erase_Fail_Count_Chip | awk '{print $10}')
Wear_Leveling_Count=$(sudo smartctl -A $DEV | grep Wear_Leveling_Count | awk '{print $10}')
Used_Rsvd_Blk_Cnt_Chip=$(sudo smartctl -A $DEV | grep Used_Rsvd_Blk_Cnt_Chip | awk '{print $10}')
Program_Fail_Cnt_Total=$(sudo smartctl -A $DEV | grep Program_Fail_Cnt_Total | awk '{print $10}')
Erase_Fail_Count_Total=$(sudo smartctl -A $DEV | grep Erase_Fail_Count_Total | awk '{print $10}')
echo "temperature" $temperature
echo "Reallocated_Sector_Ct" $Reallocated_Sector_Ct
echo "Current_Pending_Sector" $Current_Pending_Sector
echo "Offline_Uncorrectable" $Offline_Uncorrectable
echo "UDMA_CRC_Error_Count" $UDMA_CRC_Error_Count
echo "Program_Fail_Count_Chip" $Program_Fail_Count_Chip
echo "Erase_Fail_Count_Chip" $Erase_Fail_Count_Chip
echo "Wear_Leveling_Count " $Wear_Leveling_Count
echo "Used_Rsvd_Blk_Cnt_Chip" $Used_Rsvd_Blk_Cnt_Chip
echo "Program_Fail_Cnt_Total" $Program_Fail_Cnt_Total
echo "Erase_Fail_Count_Total" $Erase_Fail_Count_Total
$GMETRIC -t float -n "Temperature" -u "Celcius" -g "SSD" -v $temperature
$GMETRIC -t float -n "Reallocated_Sector_Ct" -g "SSD" -v $Reallocated_Sector_Ct
$GMETRIC -t float -n "Current_Pending_Sector" -g "SSD" -v $Current_Pending_Sector
$GMETRIC -t float -n "Offline_Uncorrectable" -g "SSD" -v $Offline_Uncorrectable
$GMETRIC -t float -n "UDMA_CRC_Error_Count" -g "SSD" -v $UDMA_CRC_Error_Count
$GMETRIC -t float -n "Program_Fail_Count_Chip" -g "SSD" -v $Program_Fail_Count_Chip
$GMETRIC -t float -n "Erase_Fail_Count_Chip" -g "SSD" -v $Erase_Fail_Count_Chip
$GMETRIC -t float -n "Wear_Leveling_Count" -g "SSD" -v $Wear_Leveling_Count
$GMETRIC -t float -n "Used_Rsvd_Blk_Cnt_Chip" -g "SSD" -v $Used_Rsvd_Blk_Cnt_Chip
$GMETRIC -t float -n "Program_Fail_Cnt_Total" -g "SSD" -v $Program_Fail_Cnt_Total
$GMETRIC -t float -n "Erase_Fail_Count_Total" -g "SSD" -v $Erase_Fail_Count_Total
28.06.2023
Ganglia SSD Metrics
Comments Off on Ganglia SSD Metrics
No Comments
No comments yet.
RSS feed for comments on this post.
Sorry, the comment form is closed at this time.