IEEE-VIT / termiboard

A smart CLI Dashboard to fetch cpu, memory and network stats!
MIT License
35 stars 16 forks source link

[Feature] Show cpu temperature #7

Open DarthBenro008 opened 3 years ago

DarthBenro008 commented 3 years ago

Please describe the feature you want this project to offer Show CPU temperature of the computer.

Describe the solution you'd like Implement GetCpuTemperature() of cpu.go file.

Parth576 commented 3 years ago

The gopsutil host package has a function SensorsTemperatures() which returns a list of sensor keys and the corresponding temperature. Can this be used to implement this feature?

DarthBenro008 commented 3 years ago

@Parth576 i was looking for a more robust solution, sure the SensorsTemperatures() works well with unix like devices, but you will need to handle if its a windows build(SensorsTemperatures() returns a empty array on Windows) or if termiboard is being run in a virtual machine, hence the difficulty of the feature.