[go: up one dir, main page]

Skip to content

lsongdev/smartctl-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smartctl-go

A simple smartctl parser written in Go.

import "github.com/lsongdev/smartctl-go/smartctl"

info, err := smartctl.Check("/dev/disk1s1")
info, err := smartctl.Open("./sda-report.json")
info, err := smartctl.Read([]byte{})

log.Println(info.ModelName)
log.Println(info.SerialNumber)
log.Println(info.SmartStatus)
log.Println(info.Temperature)
log.Println(info.PowerCycleCount)
log.Println(info.PowerOnTime)
for _, attr := range info.ATASmartAttributes.Table {
  log.Println(attr)
}

About

A simple `smartctl` parser written in Golang.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published