Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get system temp and other info on linux [SOLVED]
QtWS25 Last Chance

How to get system temp and other info on linux [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
linuxsystem
9 Posts 4 Posters 3.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on 29 Jul 2015, 22:35 last edited by A Former User 8 Jan 2015, 13:12
    #1

    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?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Huulivoide
      wrote on 30 Jul 2015, 12:49 last edited by
      #2

      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.

      ? 1 Reply Last reply 30 Jul 2015, 13:32
      0
      • H Huulivoide
        30 Jul 2015, 12:49

        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.

        ? Offline
        ? Offline
        A Former User
        wrote on 30 Jul 2015, 13:32 last edited by
        #3

        @Huulivoide Thanks for the answer.
        i was kinda hoping for libraries tho.
        is this the only way?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Jul 2015, 21:57 last edited by
          #4

          Hi and welcome to devnet,

          Did you took a look at the proc and sys filesystem ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          ? 1 Reply Last reply 31 Jul 2015, 17:33
          0
          • S SGaist
            30 Jul 2015, 21:57

            Hi and welcome to devnet,

            Did you took a look at the proc and sys filesystem ?

            ? Offline
            ? Offline
            A Former User
            wrote on 31 Jul 2015, 17:33 last edited by
            #5

            @SGaist sry i am not sure waht that is?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 31 Jul 2015, 19:48 last edited by
              #6

              See here for the proc filesystem and here for the sysfs filesystem

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              ? 1 Reply Last reply 31 Jul 2015, 20:19
              0
              • S SGaist
                31 Jul 2015, 19:48

                See here for the proc filesystem and here for the sysfs filesystem

                ? Offline
                ? Offline
                A Former User
                wrote on 31 Jul 2015, 20:19 last edited by A Former User
                #7

                @SGaist

                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.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 31 Jul 2015, 20:25 last edited by
                  #8

                  @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.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on 1 Aug 2015, 13:11 last edited by
                    #9

                    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 Reply Last reply
                    0

                    1/9

                    29 Jul 2015, 22:35

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved