pmav99 / nvsmi

A (user-)friendly wrapper to nvdia-smi
MIT License
28 stars 8 forks source link

Power draw #4

Closed victorchall closed 2 years ago

victorchall commented 2 years ago

Could you add power draw/limit? I'd PR it but I cannot create or push branches. I believe the enforced.power.limit is the realtime and actual final power limit value after software and sensor limits.

`NVIDIA_SMI_GET_GPUS = "nvidia-smi --query-gpu=index,uuid,utilization.gpu,memory.total,memory.used,memory.free,driver_version,name,gpu_serial,display_active,display_mode,temperature.gpu,power.draw,enforced.power.limit --format=csv,noheader,nounits"

... power_draw, enforced_power_limit ...

power_draw = to_float_or_inf(values[12]) enforced_power_limit = to_float_or_inf(values[13])`

Imported locally, modified code and confirmed it works on a 2080 Ti and K80.

pmav99 commented 2 years ago

cannot create or push branches.

What do you mean? You should fork, push on your fork and then make a pull request: https://opensource.com/article/19/7/create-pull-request-github

victorchall commented 2 years ago

I opened a PR, thanks.