How to get system temp and other info on linux [SOLVED]
-
wrote on 29 Jul 2015, 22:35 last edited by A Former User 8 Jan 2015, 13:12
Hello!
I am new to qt and i want to know what libraries i need to get the system info from a linux system.
I want to get the GPU temperatures and The CPU.
Can someone help me? -
wrote on 30 Jul 2015, 12:49 last edited by
For CPU temps and and at least for open source AMD GPU drivers you should be
able to use libsensors from lmsensors, for proprietary NVIDIA and and AMD drivers
you need to use the interfaces they provide, if they even do. -
For CPU temps and and at least for open source AMD GPU drivers you should be
able to use libsensors from lmsensors, for proprietary NVIDIA and and AMD drivers
you need to use the interfaces they provide, if they even do.wrote on 30 Jul 2015, 13:32 last edited by@Huulivoide Thanks for the answer.
i was kinda hoping for libraries tho.
is this the only way? -
Hi and welcome to devnet,
Did you took a look at the proc and sys filesystem ?
-
wrote on 31 Jul 2015, 17:33 last edited by
@SGaist sry i am not sure waht that is?
-
-
wrote on 31 Jul 2015, 20:19 last edited by A Former User
I wouldn't use proc directly in this case as the sensor information provided there depends on the actual hardware. Like @Huulivoide suggested using lmsensors is much nicer as it provides a high level interface.
Edit: Ok, of course the sensor information depends on the actual hardware. What I wanted to say is that the way the info is presented there depends on the hardware (the drivers). E.g. different file paths and names.
-
@Wieland I agree with you about using lmsensors for the sensor part. However, since the OP mentioned system info in general, proc and sysfs contain most of these.
-
wrote on 1 Aug 2015, 13:11 last edited by
once again thank you all!
looks easier to be made with lmsensors so i am going to do it with that.
Again thank you all!
1/9