Method: ComputeUnit::AmdGpu#fan_max_limit

Defined in:
lib/compute_unit/gpus/amd_gpu.rb

#fan_max_limitNumeric

Note:

the OS values is between 0 - 255

Returns - current fan limit as a percentage.

Returns:

  • (Numeric)
    • current fan limit as a percentage



267
268
269
270
271
272
# File 'lib/compute_unit/gpus/amd_gpu.rb', line 267

def fan_max_limit
  cur = read_hwmon_data('pwm1_max', 0).to_i
  return cur unless cur > 0

  ((cur / 255.0) * 100).round(0)
end