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]

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 last edited by A Former User
    #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 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
      0
      • H Huulivoide

        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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

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

            ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            @SGaist sry i am not sure waht that is?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              0
              • SGaistS SGaist

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

                ? Offline
                ? Offline
                A Former User
                wrote on 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
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 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 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

                    • Login

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