func refactor/add distro info, kernel, driver, snap to debug
This commit is contained in:
parent
c5aabd5223
commit
dde9cd2133
|
@ -81,6 +81,12 @@ def main(monitor, live, daemon, install, log, debug):
|
||||||
read_log()
|
read_log()
|
||||||
elif debug:
|
elif debug:
|
||||||
footer()
|
footer()
|
||||||
|
distro_info()
|
||||||
|
driver_check()
|
||||||
|
if os.getenv('PKG_MARKER') == "SNAP":
|
||||||
|
print("Snap package: yes")
|
||||||
|
else:
|
||||||
|
print("Snap package: no")
|
||||||
print(get_sys_info())
|
print(get_sys_info())
|
||||||
footer()
|
footer()
|
||||||
elif install:
|
elif install:
|
||||||
|
|
|
@ -427,12 +427,7 @@ def mon_autofreq():
|
||||||
mon_powersave()
|
mon_powersave()
|
||||||
|
|
||||||
|
|
||||||
def sysinfo():
|
def distro_info():
|
||||||
"""
|
|
||||||
get system information
|
|
||||||
"""
|
|
||||||
print("\n" + "-" * 29 + " System information " + "-" * 30 + "\n")
|
|
||||||
|
|
||||||
import distro
|
import distro
|
||||||
|
|
||||||
dist = "UNKNOWN distro"
|
dist = "UNKNOWN distro"
|
||||||
|
@ -461,10 +456,21 @@ def sysinfo():
|
||||||
print("Linux distro: " + dist)
|
print("Linux distro: " + dist)
|
||||||
print("Linux kernel: " + pl.release())
|
print("Linux kernel: " + pl.release())
|
||||||
|
|
||||||
# driver check
|
def driver_check():
|
||||||
driver = getoutput("cpufreqctl --driver")
|
driver = getoutput("cpufreqctl --driver")
|
||||||
print("Driver: " + driver)
|
print("Driver: " + driver)
|
||||||
|
|
||||||
|
def sysinfo():
|
||||||
|
"""
|
||||||
|
get system information
|
||||||
|
"""
|
||||||
|
|
||||||
|
# call/get distro_info
|
||||||
|
distro_info()
|
||||||
|
|
||||||
|
# call/get driver_check
|
||||||
|
driver_check()
|
||||||
|
|
||||||
cpu_arch = pl.machine()
|
cpu_arch = pl.machine()
|
||||||
cpu_count = psutil.cpu_count()
|
cpu_count = psutil.cpu_count()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue