wiki:ContributedUtilities

Version 2 (modified by Gabriele Pohl, 14 years ago) ( diff )

Added HElog_smart.pl

Utilities contributed by Smartmontools users

From time to time it happens, that users contribute small utilities they wrote for additional tasks and analysis in the context of SMART disk management.

We place them on this page at your own disposal. We give no warranty for these, please contact the author directly, if you have any questions!

It is also possible to give feedback or contribute enhancements by editing the page.


Collect output of smartctl

HElog_smart.pl by H.Ellenberger

Here the description from the script author:

In order to make more valid judgments about modern big disks above 1TB it becomes more and more important to keep long term data of some parameters like soft read errors, spinup time etc.

If a file name is automatically generated using Disk model and serial no., smart data can easily be accumulated by appending it for each disk to it's individual file with a separator holding also a time stamp.

The attached program first scans /dev/disk/by-id/ for scsi/sata drives and for each drive then executes smartctl -H. If bad health status is reported it will be appended to the file.

Then smartctl -a data is gathered and also appended.

If the data is written to /var/log/SMART/ it could also become zipped and log- rotated if appropriate config files are added.

On desktop systems I run that program from /etc/init.d/ after booting and before shutdown. On uninterrupted systems I recommend adding a cron job running at least once per day.

Since I'm not an expert in Perl programming any feedback and enhancements are welcome.

Attachments (1)

  • HElog_smart.pl (1.9 KB ) - added by Gabriele Pohl 14 years ago. Perl script that appends output of smartctl -a to file name built from Model.Serial.log

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.