Improved gputemp on my T400
This commit is contained in:
parent
5213599d56
commit
e38ad96581
|
@ -2,6 +2,7 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
import subprocess
|
||||||
from subprocess import check_output
|
from subprocess import check_output
|
||||||
|
|
||||||
FORMAT = "%(asctime)s %(levelname)s %(message)s"
|
FORMAT = "%(asctime)s %(levelname)s %(message)s"
|
||||||
|
@ -14,13 +15,17 @@ aticonfig_available = is_exe("/usr/bin/aticonfig")
|
||||||
sensors_available = is_exe("/usr/bin/sensors")
|
sensors_available = is_exe("/usr/bin/sensors")
|
||||||
|
|
||||||
if sensors_available:
|
if sensors_available:
|
||||||
commands = ["sensors radeon-pci-* | grep temp1", "sensors thinkpad-isa-* | grep ATI"]
|
commands = ["sensors radeon-pci-* | grep temp1", "sensors thinkpad-isa-0000 | grep ATI"]
|
||||||
|
|
||||||
for try_command in commands:
|
for try_command in commands:
|
||||||
command = try_command
|
command = try_command
|
||||||
return_command = check_output(command, shell=True)
|
try:
|
||||||
|
return_command = check_output(command, stderr=subprocess.STDOUT, shell=True)
|
||||||
if return_command is not None:
|
if return_command is not None:
|
||||||
break
|
break
|
||||||
|
except subprocess.CalledProcessError as commandexc:
|
||||||
|
continue
|
||||||
|
|
||||||
if aticonfig_available:
|
if aticonfig_available:
|
||||||
command = "aticonfig --odgt"
|
command = "aticonfig --odgt"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user