Disk-SMART
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Disk/SMART.pm view on Meta::CPAN
=head2 B<update_data(DEVICE)>
Updates the SMART output and attributes for each device. Returns undef.
C<DEVICE> - Device identifier of a single SSD / Hard Drive or a list of devices. If none are specified then get_disk_list() is called to detect devices.
$smart->update_data('/dev/sda');
=cut
sub update_data {
my ( $self, @p_devices ) = @_;
my @devices = @p_devices ? @p_devices : $self->get_disk_list();
foreach my $device (@devices) {
my $out;
$out = _get_smart_output( $device, '-a' );
confess "Smartctl couldn't poll device $device\nSmartctl Output:\n$out\n"
if ( !$out || $out !~ /START OF INFORMATION SECTION/ );
chomp($out);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.519 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )