Fixed snap build (nproc: permission denied)

This commit is contained in:
Adnan Hodzic 2020-09-23 08:38:01 +02:00
parent f2d99f1fad
commit 39b5fc25d5
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
name: auto-cpufreq
base: core20
version: '1.3.2'
version: '1.3.3'
summary: Automatic CPU speed & power optimizer for Linux
description: |
Automatic CPU speed & power optimizer for Linux based on active
@ -21,6 +21,8 @@ parts:
build-packages:
- gcc
- python3-dev
stage-packages:
- coreutils
source: .
deploy-scripts:

View File

@ -488,9 +488,10 @@ def sysinfo():
# psutil current freq not used, gives wrong values with offline cpu's
minmax_freq_per_cpu = psutil.cpu_freq(percpu=True)
# max and min freqs, psutil reports wrong max/min freqs whith offline cores with percpu=False
# max and min freqs, psutil reports wrong max/min freqs whith offline cores with percpu=False #119
max_freq = max([freq.max for freq in minmax_freq_per_cpu])
min_freq = min([freq.min for freq in minmax_freq_per_cpu])
print("\n" + "-" * 30 + " Current CPU states " + "-" * 30 + "\n")
print(f"CPU max frequency: {max_freq:.0f} MHz")
print(f"CPU min frequency: {min_freq:.0f} MHz\n")