mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-20 20:24:42 +02:00
Fixed where average all core temp is displayed with too many decimals. (#392)
* Fixed where average all core temp is displayed with too many decimals. * Made both total system load, and avg temp 2 decimals in cleaner .format form.
This commit is contained in:
parent
ae1f53c737
commit
fbd4863213
@ -490,8 +490,8 @@ def display_load():
|
|||||||
load1m, _, _ = os.getloadavg()
|
load1m, _, _ = os.getloadavg()
|
||||||
|
|
||||||
print("\nTotal CPU usage:", cpuload, "%")
|
print("\nTotal CPU usage:", cpuload, "%")
|
||||||
print("Total system load:", load1m)
|
print("Total system load: {:.2f}".format(load1m))
|
||||||
print("Average temp. of all cores:", avg_all_core_temp, "°C", "\n")
|
print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp))
|
||||||
|
|
||||||
|
|
||||||
# set minimum and maximum CPU frequencies
|
# set minimum and maximum CPU frequencies
|
||||||
@ -593,8 +593,8 @@ def set_powersave():
|
|||||||
load1m, _, _ = os.getloadavg()
|
load1m, _, _ = os.getloadavg()
|
||||||
|
|
||||||
print("\nTotal CPU usage:", cpuload, "%")
|
print("\nTotal CPU usage:", cpuload, "%")
|
||||||
print("Total system load:", load1m)
|
print("Total system load: {:.2f}".format(load1m))
|
||||||
print("Average temp. of all cores:", avg_all_core_temp, "°C")
|
print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp))
|
||||||
|
|
||||||
# conditions for setting turbo in powersave
|
# conditions for setting turbo in powersave
|
||||||
if conf.has_option("battery", "turbo"):
|
if conf.has_option("battery", "turbo"):
|
||||||
@ -695,8 +695,8 @@ def mon_powersave():
|
|||||||
load1m, _, _ = os.getloadavg()
|
load1m, _, _ = os.getloadavg()
|
||||||
|
|
||||||
print("\nTotal CPU usage:", cpuload, "%")
|
print("\nTotal CPU usage:", cpuload, "%")
|
||||||
print("Total system load:", load1m)
|
print("Total system load: {:.2f}".format(load1m))
|
||||||
print("Average temp. of all cores:", avg_all_core_temp, "°C")
|
print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp))
|
||||||
|
|
||||||
if psutil.cpu_percent(percpu=False, interval=0.01) >= 30.0 or isclose(
|
if psutil.cpu_percent(percpu=False, interval=0.01) >= 30.0 or isclose(
|
||||||
max(psutil.cpu_percent(percpu=True, interval=0.01)), 100
|
max(psutil.cpu_percent(percpu=True, interval=0.01)), 100
|
||||||
@ -802,8 +802,8 @@ def set_performance():
|
|||||||
load1m, _, _ = os.getloadavg()
|
load1m, _, _ = os.getloadavg()
|
||||||
|
|
||||||
print("\nTotal CPU usage:", cpuload, "%")
|
print("\nTotal CPU usage:", cpuload, "%")
|
||||||
print("Total system load:", load1m)
|
print("Total system load: {:.2f}".format(load1m))
|
||||||
print("Average temp. of all cores:", avg_all_core_temp, "°C")
|
print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp))
|
||||||
|
|
||||||
if conf.has_option("charger", "turbo"):
|
if conf.has_option("charger", "turbo"):
|
||||||
auto = conf["charger"]["turbo"]
|
auto = conf["charger"]["turbo"]
|
||||||
@ -904,8 +904,8 @@ def mon_performance():
|
|||||||
load1m, _, _ = os.getloadavg()
|
load1m, _, _ = os.getloadavg()
|
||||||
|
|
||||||
print("\nTotal CPU usage:", cpuload, "%")
|
print("\nTotal CPU usage:", cpuload, "%")
|
||||||
print("Total system load:", load1m)
|
print("Total system load: {:.2f}".format(load1m))
|
||||||
print("Average temp. of all cores:", avg_all_core_temp, "°C")
|
print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp))
|
||||||
|
|
||||||
# get system/CPU load
|
# get system/CPU load
|
||||||
load1m, _, _ = os.getloadavg()
|
load1m, _, _ = os.getloadavg()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user