Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
krugertech authored Jun 19, 2017
1 parent 94f47dc commit 58f261f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# SMART.Net
A class library for the reading of HDD and SSD SMART registers.

# Usage
```cs

var drives = SmartHelper.GetDrives();

foreach (var drive in drives)
{
Console.WriteLine("-----------------------------------------------------");
Console.WriteLine(" DRIVE ({0}): " + drive.Serial + " - " + drive.Model + " - " + drive.Type, ((drive.IsOK) ? "OK" : "BAD"));
Console.WriteLine("-----------------------------------------------------");
Console.WriteLine("");

Console.WriteLine("ID Current Worst Threshold Data Status");
foreach (var attr in drive.SmartAttributeAttributes)
{
if (attr.HasData)
Console.WriteLine("{0}\t {1}\t {2}\t {3}\t " + attr.Data + " " + ((attr.IsOK) ? "OK" : "BAD"), "(" + attr.Register +")" + attr.Name, attr.Current, attr.Worst, attr.Threshold);
}
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
}
```

0 comments on commit 58f261f

Please sign in to comment.