GPU Line Chart

Forums Desktop Info GPU Line Chart

Viewing 17 reply threads
  • Author
    Posts
    • #3415
      Avatarecho

      Hello,
      i have made a cmd script to show the usage of my nvidia gpu. I would like to make a line chart of that data, but the chart is empty.

      CMD=active:1,interval:3,hide-no-result:1,file:cmd.exe,parameters:/C script\get-nvidia-usage.cmd,trim,show-window:0,chart:line linear 100 1 00ff00,display:%4,text:GPU Usage,color:FFFFFF

      And the cmd script:

      @echo off
      for /f "tokens=3 delims= " %%i in ('script\nvidia-smi.exe -q ^| findstr /r /c:"^ *Gpu *:"') do (echo %%i)

      Did you have a hint for me?

      Greetings

      0
    • #3416
      GlennGlenn
      Keymaster

      i can’t test the cmd script so i will have to assume the output is giving you the single value you’re expecting. I see your chart option is displaying %1, I think this should be %4, same as the display. Check the manual for details.

      chart:line linear 100 4 00ff00

      you probably want to adjust the max option to something appropriate.

      0
    • #3426
      Avatarecho

      Hello,
      the cmd script is working well. I get a number between 0 and 100. And this Output will printed correctly in Desktop Info.

      I have corrected the config to:
      CMD=active:1,interval:3,hide-no-result:1,file:cmd.exe,parameters:/C script\get-nvidia-usage.cmd,trim,show-window:0,chart:line linear 100 4 00ff00,display:%4,text:GPU Usage,color:FFFFFF

      Sadly, I had the 4 in the “chart:line linear 100 4” some time ago.
      But this doesn’t change the result. Look at my screenshot

      thanks for your help

      0
    • #3431
      GlennGlenn
      Keymaster

      Please post your screen shot here rather than on another site. You’ll need to log in.

      0
    • #3433
      Avatarecho
      Participant

      Ok. I put the screenshot here

      Attachments:
      1+
    • #3435
      GlennGlenn
      Keymaster

      I found two issues: the first is the trim option needs to have a true value, “trim:1”, the second is the value is coming back as a string and hence the charts are ignoring it. I’ll add a ‘last resort’ option to try to convert a string to a numeric value that can be charted.

      0
    • #3461
      Avatarecho
      Participant

      After an update to 2.9.0 the diagram is drawn correctly.
      Thanks a lot

      1+
    • #3522
      AvatarBazokaa
      Participant

      @Echo, can you post your desktopinfo and all additional CMD codes here??
      This would me help alot.

      0
    • #3535
      Avatarecho
      Participant

      Hello,
      I added my config with all CMD files…
      Hope it helps you 🙂

      • This reply was modified 3 weeks, 4 days ago by Avatarecho.
      0
    • #3538
      Avatarecho
      Participant

      I have looked into the nvidia-smi and found an easer way for the same output…

      
      C:\WINDOWS\system32>nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits
      3
      
      C:\WINDOWS\system32>nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits
      6144
      
      C:\WINDOWS\system32>nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits
      687
      
      C:\WINDOWS\system32>nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits
      35
      
      C:\WINDOWS\system32>
      

      That should be an better way to get to the same results. You have only make 4 cmd scripts with one of the lines in it and call it from desktop-info.

      You can look with “nvidia-smi –help-query-gpu” for more query thinks. Or look with “nvidia-smi –help” for generally help.

      • This reply was modified 3 weeks, 4 days ago by Avatarecho.
      1+
    • #3540
      Avatarecho
      Participant

      I have rewritten my cmd scripts for you and put it in this zip file. The old scripts are in the folder old. So the other zip is obsolete and can be deleted from this thread.

      Only the RAM display is the old script because it is easer for my display usage.

      1+
      • #3542
        AvatarBazokaa
        Participant

        Thank you very much.
        I had similar ideas with one cmd script to get all relevant datas:

        @nvidia-smi --query-gpu=temperature.gpu,fan.speed,utilization.gpu,utilization.memory,memory.total,memory.used,memory.free,pstate,clocks.sm,clocks.mem --format=csv,noheader,nounits

        but Gleen told me I had to read each value separately. So the next “ugly” way is to create separately scripts for each value. Im not so happy with this, but i will try it next weekend.

        I found also another command useful, but not in this case:

        @nvidia-smi dmon -c 1

        0
    • #3613
      AvatarNathan_K
      Participant

      Here’s an updated set of lines for your INI if you don’t want to use scripts.

      CMD=active:1,interval:5,hide-no-result:1,file:cmd.exe,parameters:/C "c:\program files\nvidia corporation\nvsmi\nvidia-smi.exe" --query-gpu=temperature.gpu --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_temp,display:%4,hidden:1
      CMD=active:1,interval:5,hide-no-result:1,file:cmd.exe,parameters:/C "c:\program files\nvidia corporation\nvsmi\nvidia-smi.exe" --query-gpu=memory.total --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_mem_total,display:%4,hidden:1
      CMD=active:1,interval:5,hide-no-result:1,file:cmd.exe,parameters:/C "c:\program files\nvidia corporation\nvsmi\nvidia-smi.exe" --query-gpu=memory.used --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_mem_used,display:%4,hidden:1
      CMD=active:1,interval:3,hide-no-result:1,file:cmd.exe,parameters:/C "c:\program files\nvidia corporation\nvsmi\nvidia-smi.exe" --query-gpu=utilization.gpu --format=csv\,noheader\,nounits,trim:1,show-window:0,color:22ccee,Text:GPU Usage,display:Temp: %gpu_temp%C   Usage: %4%   Memory: %gpu_mem_used% MiB / %gpu_mem_total% MiB,chart:line2 linear 100 4 00ff00,threshold1:4 40 909090,threshold2:4 60 FFBF00,threshold3:4 90 ff0000
      • This reply was modified 2 weeks, 4 days ago by AvatarNathan_K.
      1+
      • #3615
        AvatarNathan_K
        Participant

        Let me correct that last line. Had an issue with my line chart.

        CMD=active:1,interval:3,hide-no-result:1,file:cmd.exe,parameters:/C "c:\program files\nvidia corporation\nvsmi\nvidia-smi.exe" --query-gpu=utilization.gpu --format=csv\,noheader\,nounits,trim:1,show-window:0,color:22ccee,Text:GPU Usage,display:Temp: %gpu_temp%C Usage: %4% Memory: %gpu_mem_used% MiB / %gpu_mem_total% MiB,chart:line2 scale:linear max:100 series1:%4 color1:00ff00,threshold1:4 40 909090,threshold2:4 60 FFBF00,threshold3:4 90 ff0000

        1+
        • #3616
          GlennGlenn
          Keymaster

          where do those variables in the display template come from?

          0
    • #3617
      AvatarNathan_K
      Participant

      They are set in the prior 3 lines (code block in the above post). The line in post #3615 replaces the last line in post #3613.

      1+
      • #3618
        GlennGlenn
        Keymaster

        ah, nice!

        0
    • #3631
      AvatarBazokaa
      Participant

      Dear Glenn,

      Thank you very much. I think its better to use no additional scripts.
      I tried your 4 lines and changed the path for the nvidia exe to
      “C:\Windows\System32\nvidia-smi.exe”.
      I changed the hidden:0 to see whats happen. I get a message, that the path is wrong or not exist. But it should be correct. See the attached images.

      Attachments:
      0
      • #3635
        AvatarBazokaa
        Participant

        I think the EDIT Button is not wirking correctly in your forum.

        I changed the lines a bit:
        directory:C:\Windows\System32,parameters:/C nvidia-smi.exe

        CMD=active:1,interval:1,hide-no-result:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=temperature.gpu --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_temp,display:%4,hidden:0

        Now i get values.
        I still work on it

        1+
    • #3636
      AvatarNathan_K
      Participant

      Hey Bazokaa.. can you provide a copy of the config lines you have in a code block for review? I want to see if there is anything you have different other than the path to the “nvidia-smi.exe” file.

      Update: Nevermind.. you beat me to it. 🙂

      • This reply was modified 2 weeks ago by AvatarNathan_K.
      0
    • #3638
      AvatarBazokaa
      Participant

      Actually I used this below.
      It works (still a issue with threshold in chart for GPU temp) but i run into another unexcpeted issue.
      The program consumes too many resources. I see it in the task manager. Every time it is updated the load is too high. I was not aware of this. Other programs use less load. See attached file. I marked it.

      # Sample configuration file
      # See the manual for a full description of all options
      
      [options]
      
      # size and position
      top=0
      right=0
      
      width=240
      monitor-num=0
      allowdrag=0
      nav=0
      formcolor=000000
      transparency=50
      column1width=70
      
      # font
      font-face=Arial
      font-size=8
      
      # logging
      log=desktopinfo.log
      log-level=error
      
      #misc
      desktopinfo64=1
      ignore-setting-change=1
      
      [screen-saver]
      font-face=Comic Sans MS
      font-size=16
      centerv=1
      centerh=1
      
      [items]
      
      # colors
      set=key:White,value:#ffffff
      set=key:Grey,value:#909090
      set=key:Cyan,value:#00ffff
      set=key:Magenta,value:#ff00ff
      set=key:Green,value:#00ff00
      set=key:Orange,value:#ffd000
      set=key:Yellow,value:#ffff00
      set=key:Silver,value:#d0d0d0
      set=key:Blue,value:#0000f0
      set=key:Red,value:#ff0000
      
      # page 1
      PAGE=1
      PAGE-TITLE=Overview
      COLOR=%Cyan%
      
      # Date/Time
      COMMENT=	font-size:120%,	color:#ffffff,	style:iwb,text:Daves Overview V01
      DATETIME=					color:#b0ffb0,	interval:30,display:%9 %10
      BOOTTIME=					color:#b0ffb0, 	active:1,interval:0
      UPTIME=						color:#b0ffb0,	active:1,interval:30,set:uptime,display:%1d :%2h :%3m
      HOST=						color:#b0ffb0,	interval:0
      
      # CPUTYPE
      COMMENT=	font-size:120%,	color:#ffffff,	style:iwb,text:CPU Usage
      CPUTYPE=	row-text:CPU Type,	color:#b0ffb0
      WMI=		color:#b0ffb0,	interval:5,text:CPU Info,namespace:root\cimv2,query:Win32_Processor,display:Cores:    %NumberOfCores%|Speed:   %MaxClockSpeed%MHz|Current:  %CurrentClockSpeed%MHz
      
      #CPU Temperatur
      CORETEMP=	row-text:Temp: CPU,			color:#d0d0d0,	interval:2,	threshold2:1 70 #EE9900,threshold1:1 80 #ff0000,chart:line2 height:2 scale:linear max:100 series1:1 color1:#00ff00,display:%1%2 %chart%
      
      #CPU Usage
      CPUUSAGE=	row-text:CPU %1,			color:#d0d0d0,	interval:2,	threshold2:2 55 #EE9900,threshold1:2 95 #ff0000,chart:line2 scale:linear max:100 series1:2 color1:00ff00 row-id:1, display:%2[3.0d]% %chart%
      
      #RAM Usage
      PHYSICALRAM=row-text:RAM,				color:#d0d0d0,	interval:30,threshold2:3 75 #EE9900,threshold1:3 90 #ff0000,chart:line2 height:2 scale:linear max:100 series1:3 color1:#00ff00,display:%1[3.1b]B / %2[3.1b]B (%3%),	
      
      # GPUTYPE
      COMMENT=	font-size:120%,	color:#ffffff,	style:iwb,text:GPU Usage
      DISPLAYCONTROLLER=row-text:GPU Type,color:#b0ffb0
      
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=temperature.gpu --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_temp,display:%4,row-text:temp:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=fan.speed --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_fan_perc,display:%4,row-text:fan:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=utilization.gpu --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_used_perc,display:%4,row-text:gpu_used:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=utilization.memory --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_mem_used_perc,display:%4,row-text:mem_used:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=memory.used --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_mem_used,display:%4,row-text:M_used:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=memory.free --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_mem_free,display:%4,row-text:M_free:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=memory.total --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_mem_total,display:%4,row-text:M_total:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=pstate --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_pstate,display:%4,row-text:PState:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=clocks.sm --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_clocks_sm,display:%4,row-text:GPU Clock:
      CMD=active:1,interval:5,hide-no-result:1,hidden:1,file:cmd.exe,directory:C:\Windows\System32,parameters:/C nvidia-smi.exe --query-gpu=clocks.mem --format=csv\,noheader\,nounits,trim:1,show-window:0,set:gpu_clocks_mem,display:%4,row-text:Memory Clock:
      
      CMD=row-text:GPU Info, active:1,interval:5,		color:#b0ffb0,	display:PowerState:       %gpu_pstate% |Core Speed:       %gpu_clocks_sm%MHz |Memory Speed:  %gpu_clocks_mem%MHz 
      CMD=row-text:GPU Usage,active:1,interval:5,		color:#d0d0d0,	display: Usage: %gpu_used_perc%% |VRam: %gpu_mem_used% MiB / %gpu_mem_total% MiB (%gpu_mem_used_perc%%)
      
      CMD=row-text:Temp: GPU,		color:#d0d0d0,	interval:2,		chart:line2 height:2 scale:linear max:100 series1:%gpu_temp% color1:#00ff00 series2:%gpu_fan_perc% color1:#ffff00, display:%gpu_temp%°C          Fan:   %gpu_fan_perc%%
      
      # HDD / Disks
      COMMENT=	font-size:120%,	color:#ffffff,	style:iwb,text:HDD & Disks
      LOGICALDRIVES= row-text:Drive %1: | %3,	color:#b0ffb0,	interval:60,	diskio:0, chart:bar2 scale:linear max:100 series1:7 threshold:75 color1:#d0d0d0 color2:#EE9900 color3:#ff0000,threshold2:7 75 #EE9900, threshold1:7 90 #ff0000, display:%6[1.0B]B / %5[1.0B]B (%7[1.1f]%)|%chart%|
      
      # UTILITY
      COLOR=%Cyan%
      COMMENT=	font-size:120%,	color:#ffffff,	style:iwb,text:Utility
      WMI=namespace:root\cimv2,query:Win32_Baseboard,display:%Product%,text:Motherboard
      WMI=text:Bios,namespace:root\cimv2,query:Win32_Bios,display:%Caption%
      NETWORKADAPTER=active:1,interval:60,activeonly:1,count:8,filter:
      ALLIPADDRESS=active:0,display:%1/%3,filter:-virtual,multirow:1,interval:60,offset=1
      NETWORKINTERFACES=active:1,iftype:6 71,ipv4list:%8|,display:%25,friendlyfilter:-virtual-loopback,multirow:1,interval:60,offset=1,text:IPs
      HTTPGET=interval:600,text:External IP,source:http://ipv4.plain-text-ip.com/
      
      Attachments:
      0
    • #3640
      GlennGlenn
      Keymaster

      yes that would be a big hit on the cpu.

      0
    • #3641
      GlennGlenn
      Keymaster

      Nathan, if you were to combine all of those commands into a single command that returned all the required metrics at once as csv, can you post me the resulting output please. I’d like to see what it looks like.

      • This reply was modified 2 weeks ago by GlennGlenn.
      0
Viewing 17 reply threads
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!