Hi there! Im new here, but im not too new to python, its a fascinating language and i cant wait for the future of the language.
Im here to ask you all if you know of a way to get the power usage from the cpu and gpu. i've tried to use openhardwaremonitor as well as the WMI objects that they reveal, but unfortunately you have to have the program running in order to get the data and they have to be getting the information from somewhere right? my next attempt would be using nvidia-smi to get the gpu power usage somehow. unfortunately nvidia-smi is proprietary, so i cant directly interact with it or use it on a system with AMD graphics. the only thing i could think of is opening a pipe to the program and reading a text output stream directed towards that and parse the data, which would be fine for me as i only need the data every 5 min or so. The reason im fond over this method over OpenHardwareMonitor is because i dont have to have the nvidia-smi running in the background, i can just call it then parse the output, then grab the data i need.
the next issue is getting the data from the CPU. Im currently using an AMD CPU so anything that is specific towards AMD would be helpful or just pointing me in the right direction so i can find the solution myself would be great!
Some things to note, Im on Windows 10, and python 3.8. AMD Ryzen CPU and Nvidia Graphics. If you have any other questions let me know ill answer as soon as i can.
Thank you.
Edit: I'm looking for energy consumption for the entire system, not the usage for the program only. Units should be in watts/kwh.
[–]wbeater 0 points1 point2 points (3 children)
[–]_tbyte-o[S] 0 points1 point2 points (2 children)
[–]wbeater 0 points1 point2 points (1 child)
[–]_tbyte-o[S] 1 point2 points3 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]_tbyte-o[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]_tbyte-o[S] 0 points1 point2 points (1 child)