libglacierdisk
This is the underlying library that powers the GlacierDiskInfo project. It is a linux-only library for interfacing with and reading SMART (and other) data from disks.
Usage
Run the following:
Examples
List and log disks
use libglacierdisk;
let disks = list_disks?;
for disk in disks
Get a specific disk
use ;
let disk = new.unwrap;
println!;
Get the temperature of a disk
use libglacierdisk;
let disks = list_disks?;
let first = disks.first?;
// This will be in mkelvin
println!;
Get a specific SMART attribute
use libglacierdisk;
let disks = list_disks?;
let first = disks.first?;
let attribute = first.get_attribute?;
println!;
Perform a random-write benchmark
use ;
let disks = list_disks?;
let first = disks.first?;
let mut benchmark = new
.unwrap;
let result = benchmark.run.unwrap;
println!;
println!;