def get_nvidia_smi():
    """
        :return tuple: (temperatue, cards)
    """
    nvidia = __interact_with_bash(args=['nvidia-smi'])
    temperatures = re.findall(r'\d+C', nvidia)
    cards = re.findall(r'Geforce GTX \d+', nvidia)
    return (temperatures, cards)
def get_system_distro():
    return __interact_with_bash(args=['cat', '/etc/os-release'])
def get_kernel_version():
    return __interact_with_bash(args=['uname', '-r'])
def get_system_uptime():
    return __interact_with_bash(args=['uptime', '-p'])
def get_system_temperature():
    return __interact_with_bash(args=['sensors'])
Beispiel #6
0
def update_debian_linux():
    update_debian = __interact_with_bash(args=["mkdir", "apt_log", "&&", "apt", "update", "&>", "apt_log/update_debian_based"])
    upgrade_debian = __interact_with_bash(args=["apt", "upgrade", "-y", "&>", "apt_log/upgrade_debian_based"])
Beispiel #7
0
def update_arch_linux():
    update_arch = __interact_with_bash(args=["mkdir", "yay_log", "&&", "yay", "-Syyu", "&>", "yay_log/update_arch_based"])
Beispiel #8
0
def test_kernel_command():
    cli = CliCommandsHandler()
    kernel = cli.print_command(first_arg="kernel")
    assert kernel is not None
    assert kernel == __interact_with_bash(args=['uname', '-r'])
Beispiel #9
0
def test_system_distro():
    cli = CliCommandsHandler()
    distro = cli.print_command(first_arg="distro")
    assert distro is not None
    assert distro == __interact_with_bash(args=['cat', '/etc/os-release'])