NAME
Disk::SMART - Provides an interface to smartctl
VERSION
Version 0.03
SYNOPSIS
Disk::SMART is an object ooriented module that provides an interface to get SMART disk info from a device as well as initiate testing.
use Disk::SMART;
my $smart = Disk::SMART->new('/dev/sda');
METHODS
new (DEVICE)
Instantiates the Disk::SMART object
DEVICE
- Device identifier of SSD / Hard Drive
my $smart = Disk::SMART->new( 'dev/sda', '/dev/sdb' );
Getting information from smartctl
get_disk_temp (DEVICE)
Returns an array with the temperature of the device in Celsius and Farenheit, or N/A.
DEVICE
- Device identifier of SSD / Hard Drive
my ($temp_c, $temp_f) = $smart->get_disk_temp('/dev/sda');
get_disk_health (DEVICE)
Returns the health of the disk. Output is "PASSED", "FAILED", or "N/A".
DEVICE
- Device identifier of SSD / Hard Drive
my $disk_health = $smart->get_disk_health('/dev/sda');
get_disk_model (DEVICE)
Returns the model of the device. eg. "ST3250410AS".
DEVICE
- Device identifier of SSD / Hard Drive
my $disk_model = $smart->get_disk_model('/dev/sda');
get_disk_errors (DEVICE)
Returns any listed errors
DEVICE
- DEvice identifier of SSD/ Hard Drive
my $disk_errors = $smart->get_disk_errors('/dev/sda');
AUTHOR
Paul Trost <paul.trost@trostfamily.org>
LICENSE AND COPYRIGHT
Copyright 2014.
This script is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2, or at your option any later version.
<http://gnu.org/licenses/gpl.html>