pub struct HwMon { /* private fields */ }
Expand description
Represents a hardware monitor. Hardware monitors are used to report real-time information about the device, such as temperatures and power usage.
Implementations§
Source§impl HwMon
impl HwMon
Sourcepub fn new_from_path(path: PathBuf) -> Result<Self, Error>
pub fn new_from_path(path: PathBuf) -> Result<Self, Error>
Most of the time you may want to access HwMon
s through the
GpuHandle they’re bound to.
Sourcepub fn get_temps(&self) -> HashMap<String, Temperature>
pub fn get_temps(&self) -> HashMap<String, Temperature>
Returns a HashMap of temperatures(in degress celsius), indexed by the labels (example: “edge”).
Sourcepub fn get_gpu_clockspeed(&self) -> Result<u64, Error>
pub fn get_gpu_clockspeed(&self) -> Result<u64, Error>
Gets the current GFX/compute clockspeed in MHz.
Sourcepub fn get_vram_clockspeed(&self) -> Result<u64, Error>
pub fn get_vram_clockspeed(&self) -> Result<u64, Error>
Gets the current memory clockspeed in MHz.
Sourcepub fn get_power_average(&self) -> Result<f64, Error>
pub fn get_power_average(&self) -> Result<f64, Error>
Gets the average power (currently) used by the GPU in watts.
Sourcepub fn get_power_input(&self) -> Result<f64, Error>
pub fn get_power_input(&self) -> Result<f64, Error>
Gets the instantaneous power (currently) used by the GPU in watts.
Sourcepub fn get_power_cap(&self) -> Result<f64, Error>
pub fn get_power_cap(&self) -> Result<f64, Error>
Gets the current power cap of the GPU in watts.
Sourcepub fn set_power_cap(&self, cap: f64) -> Result<(), Error>
pub fn set_power_cap(&self, cap: f64) -> Result<(), Error>
Sets the current power cap of the GPU in watts.
Sourcepub fn get_power_cap_max(&self) -> Result<f64, Error>
pub fn get_power_cap_max(&self) -> Result<f64, Error>
Gets the maximum possible power cap for the GPU in watts. If overclocking is disabled, this is probably the same as the default cap.
Sourcepub fn get_power_cap_min(&self) -> Result<f64, Error>
pub fn get_power_cap_min(&self) -> Result<f64, Error>
Gets the minimum possible power cap for the GPU in watts.
Sourcepub fn get_power_cap_default(&self) -> Result<f64, Error>
pub fn get_power_cap_default(&self) -> Result<f64, Error>
Gets the default power cap for the GPU in watts.
Sourcepub fn get_fan_pwm(&self) -> Result<u8, Error>
pub fn get_fan_pwm(&self) -> Result<u8, Error>
Gets the pulse width modulation fan level.
Sourcepub fn get_fan_min_pwm(&self) -> Result<u8, Error>
pub fn get_fan_min_pwm(&self) -> Result<u8, Error>
Gets the minimum pulse width modulation fan level.
Sourcepub fn get_fan_max_pwm(&self) -> Result<u8, Error>
pub fn get_fan_max_pwm(&self) -> Result<u8, Error>
Gets the maximum pulse width modulation fan level.
Sourcepub fn set_fan_pwm(&self, pwm: u8) -> Result<(), Error>
pub fn set_fan_pwm(&self, pwm: u8) -> Result<(), Error>
Sets the pulse width modulation fan level.
Sourcepub fn get_fan_current(&self) -> Result<u32, Error>
pub fn get_fan_current(&self) -> Result<u32, Error>
Gets the current fan speed in RPM.
Sourcepub fn get_fan_max(&self) -> Result<u32, Error>
pub fn get_fan_max(&self) -> Result<u32, Error>
Gets the maximum possible fan speed in RPM.
Sourcepub fn get_fan_min(&self) -> Result<u32, Error>
pub fn get_fan_min(&self) -> Result<u32, Error>
Gets the minimum possible fan speed in RPM.
Sourcepub fn get_fan_target(&self) -> Result<u32, Error>
pub fn get_fan_target(&self) -> Result<u32, Error>
Gets the currently desired fan speed in RPM.
Sourcepub fn set_fan_target(&self, target: u32) -> Result<(), Error>
pub fn set_fan_target(&self, target: u32) -> Result<(), Error>
Sets the desired fan speed in RPM.
Sourcepub fn get_fan_control_method(&self) -> Result<FanControlMethod, Error>
pub fn get_fan_control_method(&self) -> Result<FanControlMethod, Error>
Gets the pulse width modulation control method.
Sourcepub fn set_fan_control_method(
&self,
method: FanControlMethod,
) -> Result<(), Error>
pub fn set_fan_control_method( &self, method: FanControlMethod, ) -> Result<(), Error>
Sets the fan control method (pwm1_enable
).
Sourcepub fn get_gpu_voltage(&self) -> Result<u64, Error>
pub fn get_gpu_voltage(&self) -> Result<u64, Error>
Gets the GPU voltage in millivolts.
Sourcepub fn get_northbridge_voltage(&self) -> Result<u64, Error>
pub fn get_northbridge_voltage(&self) -> Result<u64, Error>
Gets the north bridge voltage in millivolts.