How can I fix the problems with the script to control fan speed according to the HDD temperature?
On this webpage, I found the following script to control fan speed according to hard disk temperature, but it does not work on my Mint 19. If I have understood correctly, the script file "Fancontrol_Hddtemp" should be put into "/var/lib/Fancontrol_Hddtemp". Then the configuration file "/etc/fancontrol" needs to be modified accordingly: the line
"FCTEMPS=hwmon2/pwm2=hwmon2/temp1_input" should be changed to
"FCTEMPS=hwmon2/pwm2=the path to the script file"
so that "temp1" (the motherboard temperature) will be replaced with "hddtemp" (the hard disk temperature). I have tried the following paths, neither of which works. How can I fix the problem?
/var/lib/Fancontrol_Hddtemp/
/var/lib/Fancontrol_Hddtemp/Fancontrol_Hddtemp-maximum
The following is the script file "/var/lib/Fancontrol_Hddtemp".
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/
LC_ALL=C
# set -x
# exec 2>>/var/log/Fancontrol_Hddtemp.log
# date=$(date)
DISKS="/dev/sd[a-z]"
# located in /var/lib/ so it will be there for fancontrol during boot
LOCATION=/var/lib/Fancontrol_Hddtemp
FILE_MAX="$LOCATION"/Fancontrol_Hddtemp-maximum
FILE_AVG="$LOCATION"/Fancontrol_Hddtemp-average
DEGUG=0
[[ -e $LOCATION ]] || mkdir "$LOCATION"
while true
do
temperature=0
summation=0
maximum=0
average=0
count=0
for value in $(hddtemp -n $DISKS 2>/dev/null)
do
[[ $value != [0-9]* ]] && continue
temperature="${value//[!0-9]}"
((summation+=$temperature))
((count+=1))
if [ $temperature -gt $maximum ]; then
maximum=$temperature
fi
if [ $DEGUG = 1 ]; then
average=$(echo "scale=1; $summation / $count" | bc)
echo $summation
echo $maximum
echo $average
echo $count
echo "-----"
Show original message
done
average=$(echo "scale=1; $summation / $count" | bc)
# fancontrol output format
echo "($maximum * 1000)/1" | bc > "$FILE_MAX".write
linux-mint fan
add a comment |
On this webpage, I found the following script to control fan speed according to hard disk temperature, but it does not work on my Mint 19. If I have understood correctly, the script file "Fancontrol_Hddtemp" should be put into "/var/lib/Fancontrol_Hddtemp". Then the configuration file "/etc/fancontrol" needs to be modified accordingly: the line
"FCTEMPS=hwmon2/pwm2=hwmon2/temp1_input" should be changed to
"FCTEMPS=hwmon2/pwm2=the path to the script file"
so that "temp1" (the motherboard temperature) will be replaced with "hddtemp" (the hard disk temperature). I have tried the following paths, neither of which works. How can I fix the problem?
/var/lib/Fancontrol_Hddtemp/
/var/lib/Fancontrol_Hddtemp/Fancontrol_Hddtemp-maximum
The following is the script file "/var/lib/Fancontrol_Hddtemp".
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/
LC_ALL=C
# set -x
# exec 2>>/var/log/Fancontrol_Hddtemp.log
# date=$(date)
DISKS="/dev/sd[a-z]"
# located in /var/lib/ so it will be there for fancontrol during boot
LOCATION=/var/lib/Fancontrol_Hddtemp
FILE_MAX="$LOCATION"/Fancontrol_Hddtemp-maximum
FILE_AVG="$LOCATION"/Fancontrol_Hddtemp-average
DEGUG=0
[[ -e $LOCATION ]] || mkdir "$LOCATION"
while true
do
temperature=0
summation=0
maximum=0
average=0
count=0
for value in $(hddtemp -n $DISKS 2>/dev/null)
do
[[ $value != [0-9]* ]] && continue
temperature="${value//[!0-9]}"
((summation+=$temperature))
((count+=1))
if [ $temperature -gt $maximum ]; then
maximum=$temperature
fi
if [ $DEGUG = 1 ]; then
average=$(echo "scale=1; $summation / $count" | bc)
echo $summation
echo $maximum
echo $average
echo $count
echo "-----"
Show original message
done
average=$(echo "scale=1; $summation / $count" | bc)
# fancontrol output format
echo "($maximum * 1000)/1" | bc > "$FILE_MAX".write
linux-mint fan
add a comment |
On this webpage, I found the following script to control fan speed according to hard disk temperature, but it does not work on my Mint 19. If I have understood correctly, the script file "Fancontrol_Hddtemp" should be put into "/var/lib/Fancontrol_Hddtemp". Then the configuration file "/etc/fancontrol" needs to be modified accordingly: the line
"FCTEMPS=hwmon2/pwm2=hwmon2/temp1_input" should be changed to
"FCTEMPS=hwmon2/pwm2=the path to the script file"
so that "temp1" (the motherboard temperature) will be replaced with "hddtemp" (the hard disk temperature). I have tried the following paths, neither of which works. How can I fix the problem?
/var/lib/Fancontrol_Hddtemp/
/var/lib/Fancontrol_Hddtemp/Fancontrol_Hddtemp-maximum
The following is the script file "/var/lib/Fancontrol_Hddtemp".
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/
LC_ALL=C
# set -x
# exec 2>>/var/log/Fancontrol_Hddtemp.log
# date=$(date)
DISKS="/dev/sd[a-z]"
# located in /var/lib/ so it will be there for fancontrol during boot
LOCATION=/var/lib/Fancontrol_Hddtemp
FILE_MAX="$LOCATION"/Fancontrol_Hddtemp-maximum
FILE_AVG="$LOCATION"/Fancontrol_Hddtemp-average
DEGUG=0
[[ -e $LOCATION ]] || mkdir "$LOCATION"
while true
do
temperature=0
summation=0
maximum=0
average=0
count=0
for value in $(hddtemp -n $DISKS 2>/dev/null)
do
[[ $value != [0-9]* ]] && continue
temperature="${value//[!0-9]}"
((summation+=$temperature))
((count+=1))
if [ $temperature -gt $maximum ]; then
maximum=$temperature
fi
if [ $DEGUG = 1 ]; then
average=$(echo "scale=1; $summation / $count" | bc)
echo $summation
echo $maximum
echo $average
echo $count
echo "-----"
Show original message
done
average=$(echo "scale=1; $summation / $count" | bc)
# fancontrol output format
echo "($maximum * 1000)/1" | bc > "$FILE_MAX".write
linux-mint fan
On this webpage, I found the following script to control fan speed according to hard disk temperature, but it does not work on my Mint 19. If I have understood correctly, the script file "Fancontrol_Hddtemp" should be put into "/var/lib/Fancontrol_Hddtemp". Then the configuration file "/etc/fancontrol" needs to be modified accordingly: the line
"FCTEMPS=hwmon2/pwm2=hwmon2/temp1_input" should be changed to
"FCTEMPS=hwmon2/pwm2=the path to the script file"
so that "temp1" (the motherboard temperature) will be replaced with "hddtemp" (the hard disk temperature). I have tried the following paths, neither of which works. How can I fix the problem?
/var/lib/Fancontrol_Hddtemp/
/var/lib/Fancontrol_Hddtemp/Fancontrol_Hddtemp-maximum
The following is the script file "/var/lib/Fancontrol_Hddtemp".
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin/
LC_ALL=C
# set -x
# exec 2>>/var/log/Fancontrol_Hddtemp.log
# date=$(date)
DISKS="/dev/sd[a-z]"
# located in /var/lib/ so it will be there for fancontrol during boot
LOCATION=/var/lib/Fancontrol_Hddtemp
FILE_MAX="$LOCATION"/Fancontrol_Hddtemp-maximum
FILE_AVG="$LOCATION"/Fancontrol_Hddtemp-average
DEGUG=0
[[ -e $LOCATION ]] || mkdir "$LOCATION"
while true
do
temperature=0
summation=0
maximum=0
average=0
count=0
for value in $(hddtemp -n $DISKS 2>/dev/null)
do
[[ $value != [0-9]* ]] && continue
temperature="${value//[!0-9]}"
((summation+=$temperature))
((count+=1))
if [ $temperature -gt $maximum ]; then
maximum=$temperature
fi
if [ $DEGUG = 1 ]; then
average=$(echo "scale=1; $summation / $count" | bc)
echo $summation
echo $maximum
echo $average
echo $count
echo "-----"
Show original message
done
average=$(echo "scale=1; $summation / $count" | bc)
# fancontrol output format
echo "($maximum * 1000)/1" | bc > "$FILE_MAX".write
linux-mint fan
linux-mint fan
edited 5 mins ago
Matthew Wai
asked 10 mins ago
Matthew WaiMatthew Wai
1085
1085
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503482%2fhow-can-i-fix-the-problems-with-the-script-to-control-fan-speed-according-to-the%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503482%2fhow-can-i-fix-the-problems-with-the-script-to-control-fan-speed-according-to-the%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown