Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add drive temperature monitoring #360

Merged

Conversation

PartialVolume
Copy link
Collaborator

Color/status of temperature readout Meaning
White Within operating temperature
Red Maximum continuous operating temperature reached
Red Flashing Critical temperature reached, damage may occur
Black Minimum continuous operating temperature reached
Black flashing Minimum critical temperature reached, damage may occur

Demo video showing how temperature display changes based on min,max,upper/lower critical limits as supplied by the drive.

nwipe_demo_temperature-2021-11-10_22.47.24.mp4

Stage 1 adds the additional variables to the drive
context and creates the temperature initialisation
function, which associates a hwmonX directory with
a block device. Also wrote the context update function,
that reads hwmon for each drive context and writes the
temperatures back to the context.

Stage 2 commit to follow which will make changes within
the GUI to call the update function every 60 seconds
and display the temperature information.
Stage 2 modifies the GUI to trigger a temperature
update every 60 seconds. Changes were made to the
drive progress line to include [ 30C ]. The drive
context structure had another variable added that
records the time of the temperature update.

Note. When the temperature data cannot be retrieved
from the hwmon (drivetemp) module the GUI displays
[ --C ]. USB devices, even those adapters that support
ATA pass through, don't seem to work with hwmon (drivetemp),
at least the adapters I have don't work with drivetemp
to monitor temperature.
1. Changed u64 to int to support negative
temperature values, i.e. temp1_lcrit may
be as low as -40C

2. In gui surround temperature reading with
square brackets instead of round brackets to
be consistent with the rest of the drive status line
1. Changed gui format specifier to match signed
integer that we changed to in the previous commit.

2. Changed the format specifier in verbose nwipe logging of
the temperatures and moved the nwipe log message that prints
the hwmonX path to the log in order to remove
unnecessary printing to the log.
1. Changed a few nwipe log messages to improve
readability.

2. Added code so that the temperature changes from
- white text = (Temperature within spec)
- red text = max continuous temp reached
- red flashing text = critical upper temperature reached
- black text = minimum continuous temperature reached
- black flashing text = critical lower temperature reached.
@PartialVolume PartialVolume merged commit 584f70e into martijnvanbrummelen:master Nov 10, 2021
@PartialVolume PartialVolume deleted the Add_drive_temperature branch November 10, 2021 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant