valpackett / systemstat

Rust library for getting system information | also on https://codeberg.org/valpackett/systemstat
https://crates.io/crates/systemstat
The Unlicense
610 stars 71 forks source link

cpu temperature and battery information missing #122

Closed PrethamMuthappa closed 8 months ago

PrethamMuthappa commented 8 months ago

I am trying to get the data of my cpu temperature in my linux machine and I get the following error Os { code: 2, kind: NotFound, message: "No such file or directory" }

Note:- Linux is running in Virtual Machine I believe this error is causing due to the fact i am running this in a virtual machine ,I am not sure yet

And for the battery information I get this error Custom { kind: Other, error: "Missing battery information" } Rest all works as intended , only these 2 functions are not performing

valpackett commented 8 months ago

That is working as intended, if the kernel does not have the information we cannot magically conjure it out of thin air.

Yes, CPU temperature is usually not available in VMs. Battery info is passed through by some hypervisors but not always.

PrethamMuthappa commented 8 months ago

ahhkk, thanks!