GPU Line Chart
› Forums › Desktop Info › GPU Line Chart
Tagged: cmd, gpu, monitoring, nvidia-smi
- This topic has 22 replies, 4 voices, and was last updated 2 years ago by
Glenn.
-
AuthorPosts
-
-
26 September, 2020 at 12:15 am #3415
echo
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:
12@echo offfor /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
-
26 September, 2020 at 6:38 am #3416
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.
-
27 September, 2020 at 12:25 am #3426
echo
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 screenshotthanks for your help
-
27 September, 2020 at 7:04 am #3431
Please post your screen shot here rather than on another site. You’ll need to log in.
-
27 September, 2020 at 10:38 pm #3433
-
29 September, 2020 at 9:30 am #3435
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.
-
6 October, 2020 at 3:31 am #3461
After an update to 2.9.0 the diagram is drawn correctly.
Thanks a lot -
9 November, 2020 at 12:27 am #3522
-
10 November, 2020 at 4:56 am #3535
Hello,
I added my config with all CMD files…
Hope it helps you 🙂-
This reply was modified 2 years ago by
echo.
Attachments:
-
This reply was modified 2 years ago by
-
10 November, 2020 at 5:49 am #3538
I have looked into the nvidia-smi and found an easer way for the same output…
123456789101112131415C:\WINDOWS\system32>nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits3C:\WINDOWS\system32>nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits6144C:\WINDOWS\system32>nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits687C:\WINDOWS\system32>nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits35C:\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 2 years ago by
echo.
-
This reply was modified 2 years ago by
-
10 November, 2020 at 6:17 am #3540
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.
Attachments:
-
10 November, 2020 at 6:38 am #3542
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
-
17 November, 2020 at 8:43 am #3613
Here’s an updated set of lines for your INI if you don’t want to use scripts.
1234CMD=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:1CMD=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:1CMD=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:1CMD=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 years ago by
Nathan_K.
-
17 November, 2020 at 8:51 am #3615
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
-
17 November, 2020 at 10:02 am #3616
where do those variables in the display template come from?
-
-
This reply was modified 2 years ago by
-
17 November, 2020 at 11:31 am #3617
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.
-
17 November, 2020 at 11:42 am #3618
ah, nice!
-
-
21 November, 2020 at 1:30 am #3631
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.-
21 November, 2020 at 1:38 am #3635
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
-
-
21 November, 2020 at 1:39 am #3636
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 years ago by
Nathan_K.
-
This reply was modified 2 years ago by
-
21 November, 2020 at 5:02 am #3638
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.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109# Sample configuration file# See the manual for a full description of all options[options]# size and positiontop=0right=0width=240monitor-num=0allowdrag=0nav=0formcolor=000000transparency=50column1width=70# fontfont-face=Arialfont-size=8# logginglog=desktopinfo.loglog-level=error#miscdesktopinfo64=1ignore-setting-change=1[screen-saver]font-face=Comic Sans MSfont-size=16centerv=1centerh=1[items]# colorsset=key:White,value:#ffffffset=key:Grey,value:#909090set=key:Cyan,value:#00ffffset=key:Magenta,value:#ff00ffset=key:Green,value:#00ff00set=key:Orange,value:#ffd000set=key:Yellow,value:#ffff00set=key:Silver,value:#d0d0d0set=key:Blue,value:#0000f0set=key:Red,value:#ff0000# page 1PAGE=1PAGE-TITLE=OverviewCOLOR=%Cyan%# Date/TimeCOMMENT= font-size:120%, color:#ffffff, style:iwb,text:Daves Overview V01DATETIME= color:#b0ffb0, interval:30,display:%9 %10BOOTTIME= color:#b0ffb0, active:1,interval:0UPTIME= color:#b0ffb0, active:1,interval:30,set:uptime,display:%1d :%2h :%3mHOST= color:#b0ffb0, interval:0# CPUTYPECOMMENT= font-size:120%, color:#ffffff, style:iwb,text:CPU UsageCPUTYPE= row-text:CPU Type, color:#b0ffb0WMI= color:#b0ffb0, interval:5,text:CPU Info,namespace:root\cimv2,query:Win32_Processor,display:Cores: %NumberOfCores%|Speed: %MaxClockSpeed%MHz|Current: %CurrentClockSpeed%MHz#CPU TemperaturCORETEMP= 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 UsageCPUUSAGE= 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 UsagePHYSICALRAM=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%),# GPUTYPECOMMENT= font-size:120%, color:#ffffff, style:iwb,text:GPU UsageDISPLAYCONTROLLER=row-text:GPU Type,color:#b0ffb0CMD=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%MHzCMD=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 / DisksCOMMENT= font-size:120%, color:#ffffff, style:iwb,text:HDD & DisksLOGICALDRIVES= 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%|# UTILITYCOLOR=%Cyan%COMMENT= font-size:120%, color:#ffffff, style:iwb,text:UtilityWMI=namespace:root\cimv2,query:Win32_Baseboard,display:%Product%,text:MotherboardWMI=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=1NETWORKINTERFACES=active:1,iftype:6 71,ipv4list:%8|,display:%25,friendlyfilter:-virtual-loopback,multirow:1,interval:60,offset=1,text:IPsHTTPGET=interval:600,text:External IP,source:http://ipv4.plain-text-ip.com/Attachments:
-
21 November, 2020 at 6:12 am #3640
yes that would be a big hit on the cpu.
-
21 November, 2020 at 6:36 am #3641
-
-
AuthorPosts
- The topic ‘GPU Line Chart’ is closed to new replies.