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()
|
||||
elif debug:
|
||||
footer()
|
||||
distro_info()
|
||||
driver_check()
|
||||
if os.getenv('PKG_MARKER') == "SNAP":
|
||||
print("Snap package: yes")
|
||||
else:
|
||||
print("Snap package: no")
|
||||
print(get_sys_info())
|
||||
footer()
|
||||
elif install:
|
||||
|
|
|
@ -427,12 +427,7 @@ def mon_autofreq():
|
|||
mon_powersave()
|
||||
|
||||
|
||||
def sysinfo():
|
||||
"""
|
||||
get system information
|
||||
"""
|
||||
print("\n" + "-" * 29 + " System information " + "-" * 30 + "\n")
|
||||
|
||||
def distro_info():
|
||||
import distro
|
||||
|
||||
dist = "UNKNOWN distro"
|
||||
|
@ -461,10 +456,21 @@ def sysinfo():
|
|||
print("Linux distro: " + dist)
|
||||
print("Linux kernel: " + pl.release())
|
||||
|
||||
# driver check
|
||||
def driver_check():
|
||||
driver = getoutput("cpufreqctl --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_count = psutil.cpu_count()
|
||||
|
||||
|
|
Loading…
Reference in New Issue