Update AppImage

This commit is contained in:
MacRimi
2025-10-07 22:26:49 +02:00
parent cf07004fcd
commit fde0b1d8bf
2 changed files with 156 additions and 153 deletions

View File

@@ -74,7 +74,7 @@ export default function Hardware() {
try {
console.log("[v0] Fetching real-time GPU data for slot:", gpu.slot)
const response = await fetch(`http://localhost:8008/api/gpu/${gpu.slot}/realtime`, {
signal: AbortSignal.timeout(3000),
signal: AbortSignal.timeout(6000),
})
if (response.ok) {
const data = await response.json()

View File

@@ -1625,7 +1625,7 @@ def get_detailed_gpu_info(gpu):
data_retrieved = False
process = None
try:
cmd = ['intel_gpu_top', '-J', '-s', '250', '-o', '-', '-d', f'sys:{sys_real}']
cmd = ['intel_gpu_top', '-J', '-s', '1000', '-o', '-', '-d', f'sys:{sys_real}']
print(f"[v0] Starting intel_gpu_top with command: {' '.join(cmd)}")
process = subprocess.Popen(
@@ -1638,17 +1638,20 @@ def get_detailed_gpu_info(gpu):
print(f"[v0] intel_gpu_top process started, reading output...")
# Read output with timeout
output_lines = []
start_time = time.time()
timeout_seconds = 5.0
timeout_seconds = 8.0
json_objects_found = 0
valid_data_found = False
while time.time() - start_time < timeout_seconds:
if process.poll() is not None:
break
try:
# Use select for non-blocking read to avoid hanging
ready_fds, _, _ = select.select([process.stdout], [], [], 0.1)
if ready_fds:
line = process.stdout.readline()
if line:
output_lines.append(line)
@@ -1804,7 +1807,7 @@ def get_detailed_gpu_info(gpu):
if json_objects_found >= 2 and data_retrieved:
break
else:
time.sleep(0.05)
time.sleep(0.05) # Sleep briefly if no output, to avoid busy-waiting
except Exception as e:
print(f"[v0] Error reading intel_gpu_top output: {e}")
@@ -2349,7 +2352,7 @@ def get_hardware_info():
# Graphics Cards (from lspci - will be duplicated by new PCI device listing, but kept for now)
try:
# Try nvidia-smi first
result = subprocess.run(['nvidia-smi', '--query-gpu=name,memory.total,temperature.gpu,power.draw', '--format=csv,noheader'],
result = subprocess.run(['nvidia-smi', '--query-gpu=name,memory.total,temperature.gpu,power.draw', '--format=csv,noheader,nounits'],
capture_output=True, text=True, timeout=5)
if result.returncode == 0:
for line in result.stdout.strip().split('\n'):
@@ -2785,7 +2788,7 @@ def api_hardware():
formatted_data = {
'cpu': hardware_info.get('cpu', {}),
'motherboard': hardware_info.get('motherboard', {}),
'bios': hardware_info.get('bios', {}),
'bios': hardware_info.get('motherboard', {}).get('bios', {}), # Extract BIOS info
'memory_modules': hardware_info.get('memory_modules', []),
'storage_devices': hardware_info.get('storage_devices', []),
'pci_devices': hardware_info.get('pci_devices', []),