Skip to content

Instantly share code, notes, and snippets.

@Jipok
Jipok / amdgpu-power-control.py
Last active February 3, 2024 06:57
TUI with chart for radeon power cap control, temp monitoring
#!/usr/bin/env python3
import plotext as plt
from subprocess import check_output
import psutil
import time
CMD = "sensors amdgpu-pci-0500 | grep PPT | grep -oP '(?<=cap =) *(.?\d+)'"
TARGET_TEMP = 83
CRITICAL_TEMP = 92
CAP_MIN = 2
@Jipok
Jipok / amdgpu_power_control2.py
Created February 11, 2024 14:41
TUI with chart for radeon power cap control, temp monitoring. SIGSTOP python if overheated
#!/usr/bin/env python3
import plotext as plt
from subprocess import check_output
import psutil
import time
import math
CMD = "sensors amdgpu-pci-0500 | grep PPT | grep -oP '(?<=cap =) *(.?\d+)'"
TARGET_TEMP_MAX = 91
TARGET_TEMP_MIN = 87