Opened 14 years ago

Closed 14 years ago

#84 closed enhancement (fixed)

Charts of various SMART attributes, scripts included

Reported by: frief Owned by: somebody
Priority: major Milestone:
Component: all Version: 5.39.1
Keywords: scripts Cc:

Description

Hi,

I used the appended awk und gnuplot scripts to generate various charts for an SSD with Indilinx controller.

What was done? I added:

FILENAME=/tmp/smartctl_`date -u +%Y%m%d_%H%M`.txt
smartctl -a /dev/sda >$FILENAME
gzip $FILENAME

to /etc/cron.hourly/smartctl

Then I passed the hourly generated files through an awk script:

zcat /tmp/smartctl_20*.txt.gz | awk -f sm.awk >sm.dat

And processed the resulting sm.dat with gnuplot

gnuplot sm.gnuplot

(not a generic solution, just one that works for me)

Greetings,
Frieder

Attachments (3)

sm_all.png (59.8 KB ) - added by frief 14 years ago.
charts of various SMART attributes
sm.awk (821 bytes ) - added by frief 14 years ago.
awk script
sm.gnuplot (3.4 KB ) - added by frief 14 years ago.
gnuplot script

Download all attachments as: .zip

Change History (8)

by frief, 14 years ago

Attachment: sm_all.png added

charts of various SMART attributes

by frief, 14 years ago

Attachment: sm.awk added

awk script

by frief, 14 years ago

Attachment: sm.gnuplot added

gnuplot script

comment:1 by frief, 14 years ago

Keywords: SuperTalent UltraDrive SSD STT_FTM64GX25H added; over removed

comment:2 by Christian Franke, 14 years ago

Keywords: scripts added; chart diagram POH SuperTalent UltraDrive SSD STT_FTM64GX25H removed

comment:3 by frief, 14 years ago

Hi,

appending a related feature request here. It would
be nice if smartctl would have a "single line" output
option.

This would make the awkward intermediate processing
with awk obsolete and the result could be directly
used with gnuplot (or a spread sheet program)

I was thinking of:

#YYYYMMDD-HHMMSS SerialNumber FirmwareVersion <AllSupportedAttributesOfThatDrive>

So for the Indilinx drive mentioned above the output could look like:

#YYYYMMDD-HHMMSS SerialNumber FirmwareVersion 1 9 12 184 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 211 212 213
20100829-161514 P612102-MIBY-208A052 1916 5 1624 273 93 0 0 0 1400619749 613827093 18546914 11447676 11364511 7586978 0 10000 97 1343 760 93 0 0 0

or:

#YYYYMMDD-HHMMSS SerialNumber FirmwareVersion Raw_Read_Error_Rate Power_On_Hours Power_Cycle_Count Initial_Bad_Block_Count Program_Failure_Blk_Ct Erase_Failure_Blk_Ct Read_Failure_Blk_Ct Read_Sectors_Tot_Ct Write_Sectors_Tot_Ct Read_Commands_Tot_Ct Write_Commands_Tot_Ct Error_Bits_Flash_Tot_Ct Corr_Read_Errors_Tot_Ct Bad_Block_Full_Flag Max_PE_Count_Spec Min_Erase_Count Max_Erase_Count Average_Erase_Count Remaining_Lifetime_Perc Unknown_Attribute Unknown_Attribute Unknown_Attribute
20100829-161514 P612102-MIBY-208A052 1916 5 1624 273 93 0 0 0 1400619749 613827093 18546914 11447676 11364511 7586978 0 10000 97 1343 760 93 0 0 0

(the lines starting with '#' are treated as comments in gnuplot)

Would that make sense?

in reply to:  3 comment:4 by Christian Franke, 14 years ago

Replying to frief:

appending a related feature request here. It would
be nice if smartctl would have a "single line" output
option.
...
Would that make sense?

Yes - please create a separate ticket for this request. We can possibly add this in conjunction with XML output (ticket #72).

comment:5 by Christian Franke, 14 years ago

Resolution: fixed
Status: newclosed

Added a reference to these scripts to ContributedUtilities page.

Note: See TracTickets for help on using tickets.