GPU: nvidia-smi or alternativ

Forums Desktop Info GPU: nvidia-smi or alternativ

Viewing 5 reply threads
  • Author
    Posts
    • #3511
      BazokaaBazokaa
      Participant

        Hello,

        I am very impressed with the program “DesktopInfo”. I’ve done some work with it, but I’m not a hardcore programmer. I’m currently stuck at the problem that I want to read the GPU data.
        It should be best if its generic for NVDIDA, AMD and INTEL. I currently only have NVIDIA, so I’m just testing it with that.

        “DesktopInfo” can not natively read GPU data (or i dont know how). So I need a workaroud. I was able to read some data via nvidia-smi and the CMD window.
        Actually I could read my most important data whit this:

        #nvidia-smi --query-gpu=temperature.gpu, fan.speed, utilization.gpu, utilization.memory, pstate, memory.total, memory.used --format=csv

        But I have no idea how i can use it with CMD commands in “DesktopInfo” i tried different cases but everything failed.

        Can someone help and maybe has something ready?

        Regards David

      • #3514
        GlennGlenn
        Keymaster

          post what you’ve tried so far.

        • #3520
          BazokaaBazokaa
          Participant

            Hello Glenn,

            unfortunately, I have to say that I haven’t been able to continue working here since last week.

            Below is the code for desktopinfo.ini.
            In the section # GPUTYPE i tried the different commands itself without cmd and also with cmd commands.

            In the cmd file, there is noting special, some few tries. In a nativ command window the command
            nvidia-smi --query-gpu=temperature.gpu --format=csv
            show me the tempreture (as example). But i cant include it in the script with
            CMD=...
            All important information for GPU monitoring could be
            #nvidia-smi --query-gpu=temperature.gpu, fan.speed, utilization.gpu, utilization.memory, pstate, memory.total, memory.used --format=csv"

            I am a little confused that no one has ever tried this before or that it has worked and that is why no one here has asked for help.

            If we can solved the GPU monitoring information into your “DesktopInfo”, it would be perfect. My next step would then be to implement it with AMD and INTEL. This should also be implemented in your sample code when we get it running.

            • This reply was modified 2 years ago by BazokaaBazokaa.
          • #3523
            BazokaaBazokaa
            Participant

              I added a screenshot. I will replace the gadgets CPU Usage and GPU Meter.
              The operator should understand this at first sight. It should no longer be so colourful and childish. In the end just professional 🙂

              Attachments:
            • #3525
              GlennGlenn
              Keymaster

                it looks like this is the code in question:

                notice how in the first line you fully qualify the batch file including extension but you haven’t done that in the second line.

                You didn’t post the batch file so I can’t comment on that. Your screen shot doesn’t show the CMD item in question, you commented it out. I don’t have a computer with an nvidia card so I can’t test it here.

                what is the output when you run the batch file from the command line?

                • #3526
                  BazokaaBazokaa
                  Participant

                    Dear Glenn thank you.

                    the two lines was for testing (relativ / absolut path) and where the sub skript could be startetd from.

                    I habe two batch files for testing. I would prefer the first one, but in the end it doesn’t matter, the main thing is that it works then.

                    1. nvidia-smi.cmd:
                    nvidia-smi --query-gpu=temperature.gpu,fan.speed,utilization.gpu,utilization.memory,pstate, memory.total,memory.used,memory.free --format=csv

                    The output is:

                    here would be all important information for available.

                    2. get-nvidia-usage.cmd:

                    the output would be:

                    but Im not very happy about this. There some lines where the names are not unique and i dont know how to filter it.

                    With this command
                    CMD= font-size:100%, color:#d0d0d0,row-text:GPU Usage,active:1,interval:1,hide-no-result:1,file:cmd.exe,parameters:/C nvidia-smi.cmd,trim,show-window:0,chart:line scale:linear max:100 series1:4 00ff00,display: Nr4: %4.2 %chart%
                    I get (maybe) useful datas. Also a screenshot from the gui.

                    • This reply was modified 2 years ago by BazokaaBazokaa.
                • #3531
                  GlennGlenn
                  Keymaster

                    You’re getting closer to it. the third screenshot is showing the cmd output.

                    Put a ‘@’ in front of the command in the nvidia-smi.cmd file:
                    @nvidia-smi --query-gpu=temperature.gpu,fan.speed,utilization.gpu,utilization.memory,pstate, memory.total,memory.used,memory.free --format=csv

                    that will stop the echo of the command line to the output.

                    You won’t get a chart out of this. DTI has no idea where to look for the data in the output. The only way to get a chart is to make the cmd return a single number, no words, just a single value.

                    It might be an interesting exercise to see if I can access the NVML api……

                    • This reply was modified 2 years ago by GlennGlenn.
                Viewing 5 reply threads
                • The topic ‘GPU: nvidia-smi or alternativ’ is closed to new replies.
                Glenn's Page