My first, concrete, library in Rust
.
Library to fetch Per CPUs stats, average cpu usage and temperature, turbo boost state.
Information on a Per CPU basis, I find this more useful for the frequencies since they are the most likely to change over time, by themselfs.
I’ve notice that this just searches /sys
.. A crate to get information about
the system from the sys filesystem
1: The kernel makes this tmp filesystem with some info that it has, mostly low
level stuff. I think some syscalls also check these paths to fetch the info but
it still “safer” to read from these than calling them from rust. On a C app this doesn’t matter since syscalls are C anyway and the defacto is
to hardcode things in C, since something it’s very hardly reusable (ideas are
tho), unless you are planning on making a library - still tho, a lib in this
context doesn’t matter since why would you choose that said library when you
can directly use a syscall (and the C mentality has to be about
performance, so why #include
unused stuff?) -.
might be a good idea, linux only, but not for this crate (however some stuff I do and will do are related).