Giter Club home page Giter Club logo

hwmon's Introduction

hwmon

Collect hwmon values

Custom for my use. I dont expect anyone would be interested besides me.
If you are, please contribute.

	err := Init("/sys/class/hwmon")
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}

	GetValues()

	for _, s := range Sensors {
		fmt.Printf("Path:%s Name:%s Head:%s Tail:%s Value:%s\n", s.Path, s.Name, s.Head, s.Tail, s.Value)
	}

Output of slice.

Path:/sys/class/hwmon/hwmon1 Name:acpitz Head:temp1 Tail:crit Value:107000
Path:/sys/class/hwmon/hwmon1 Name:acpitz Head:temp1 Tail:input Value:25000
Path:/sys/class/hwmon/hwmon2 Name:bat0 Head:curr1 Tail:input Value:1
Path:/sys/class/hwmon/hwmon2 Name:bat0 Head:in0 Tail:input Value:12809
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:fan1 Tail:input Value:0
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:fan1 Tail:label Value:processor fan
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp1 Tail:input Value:40000
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp1 Tail:label Value:cpu
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp2 Tail:input Value:33000
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp2 Tail:label Value:ambient
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp3 Tail:input Value:27000
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp3 Tail:label Value:sodimm
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp4 Tail:input Value:
Path:/sys/class/hwmon/hwmon3 Name:dell_smm Head:temp4 Tail:label Value:gpu
Path:/sys/class/hwmon/hwmon4 Name:radeon Head:freq1 Tail:input Value:
Path:/sys/class/hwmon/hwmon4 Name:radeon Head:temp1 Tail:crit Value:120000
Path:/sys/class/hwmon/hwmon4 Name:radeon Head:temp1 Tail:crit_hyst Value:90000
Path:/sys/class/hwmon/hwmon4 Name:radeon Head:temp1 Tail:input Value:
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp1 Tail:crit Value:100000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp1 Tail:crit_alarm Value:0
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp1 Tail:input Value:49000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp1 Tail:label Value:package id 0
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp1 Tail:max Value:84000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp2 Tail:crit Value:100000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp2 Tail:crit_alarm Value:0
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp2 Tail:input Value:49000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp2 Tail:label Value:core 0
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp2 Tail:max Value:84000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp3 Tail:crit Value:100000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp3 Tail:crit_alarm Value:0
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp3 Tail:input Value:45000
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp3 Tail:label Value:core 1
Path:/sys/class/hwmon/hwmon5 Name:coretemp Head:temp3 Tail:max Value:84000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.