mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-10-10 20:06:18 +00:00
Update AppImage
This commit is contained in:
@@ -96,8 +96,17 @@ export default function Hardware() {
|
|||||||
combinedData.utilization_gpu !== undefined ||
|
combinedData.utilization_gpu !== undefined ||
|
||||||
combinedData.memory_total ||
|
combinedData.memory_total ||
|
||||||
combinedData.power_draw ||
|
combinedData.power_draw ||
|
||||||
|
// Intel GPU specific fields
|
||||||
combinedData.engine_render !== undefined ||
|
combinedData.engine_render !== undefined ||
|
||||||
combinedData.clock_graphics
|
combinedData.engine_blitter !== undefined ||
|
||||||
|
combinedData.engine_video !== undefined ||
|
||||||
|
combinedData.engine_video_enhance !== undefined ||
|
||||||
|
combinedData.clock_graphics ||
|
||||||
|
combinedData.clock_memory ||
|
||||||
|
// AMD GPU specific fields
|
||||||
|
combinedData.utilization_memory !== undefined ||
|
||||||
|
// NVIDIA GPU specific fields
|
||||||
|
combinedData.processes !== undefined
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -669,18 +678,19 @@ export default function Hardware() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Extended Monitoring Not Available Message */}
|
{selectedGPU.has_monitoring_tool === false && (
|
||||||
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
||||||
<div className="flex gap-3">
|
<div className="flex gap-3">
|
||||||
<Info className="h-5 w-5 text-blue-500 flex-shrink-0 mt-0.5" />
|
<Info className="h-5 w-5 text-blue-500 flex-shrink-0 mt-0.5" />
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<p className="text-sm font-medium text-blue-500">Extended Monitoring Not Available</p>
|
<p className="text-sm font-medium text-blue-500">Extended Monitoring Not Available</p>
|
||||||
<p className="text-xs text-muted-foreground">
|
<p className="text-xs text-muted-foreground">
|
||||||
{getMonitoringToolRecommendation(pciDevice?.vendor || selectedGPU.vendor)}
|
{getMonitoringToolRecommendation(pciDevice?.vendor || selectedGPU.vendor)}
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@@ -1580,6 +1580,21 @@ def get_detailed_gpu_info(gpu):
|
|||||||
vendor = gpu.get('vendor', '').upper()
|
vendor = gpu.get('vendor', '').upper()
|
||||||
|
|
||||||
if vendor == 'INTEL':
|
if vendor == 'INTEL':
|
||||||
|
try:
|
||||||
|
check_result = subprocess.run(['which', 'intel_gpu_top'], capture_output=True, timeout=1)
|
||||||
|
if check_result.returncode != 0:
|
||||||
|
# Tool not found
|
||||||
|
detailed_info['has_monitoring_tool'] = False
|
||||||
|
print(f"[v0] intel_gpu_top not found for Intel GPU")
|
||||||
|
return detailed_info
|
||||||
|
else:
|
||||||
|
detailed_info['has_monitoring_tool'] = True
|
||||||
|
print(f"[v0] intel_gpu_top found for Intel GPU")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"[v0] Error checking for intel_gpu_top: {e}")
|
||||||
|
detailed_info['has_monitoring_tool'] = False
|
||||||
|
return detailed_info
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Try JSON output first (newer versions of intel_gpu_top)
|
# Try JSON output first (newer versions of intel_gpu_top)
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
@@ -1603,7 +1618,7 @@ def get_detailed_gpu_info(gpu):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# Fallback to text parsing
|
# Fallback to text parsing
|
||||||
if not detailed_info:
|
if not detailed_info or len(detailed_info) == 1: # Only has_monitoring_tool flag
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
['intel_gpu_top', '-s', '100'],
|
['intel_gpu_top', '-s', '100'],
|
||||||
capture_output=True, text=True, timeout=2
|
capture_output=True, text=True, timeout=2
|
||||||
@@ -1641,6 +1656,20 @@ def get_detailed_gpu_info(gpu):
|
|||||||
print(f"[v0] Error getting Intel GPU details: {e}")
|
print(f"[v0] Error getting Intel GPU details: {e}")
|
||||||
|
|
||||||
elif vendor == 'AMD' or 'ATI' in vendor:
|
elif vendor == 'AMD' or 'ATI' in vendor:
|
||||||
|
try:
|
||||||
|
check_result = subprocess.run(['which', 'radeontop'], capture_output=True, timeout=1)
|
||||||
|
if check_result.returncode != 0:
|
||||||
|
detailed_info['has_monitoring_tool'] = False
|
||||||
|
print(f"[v0] radeontop not found for AMD GPU")
|
||||||
|
return detailed_info
|
||||||
|
else:
|
||||||
|
detailed_info['has_monitoring_tool'] = True
|
||||||
|
print(f"[v0] radeontop found for AMD GPU")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"[v0] Error checking for radeontop: {e}")
|
||||||
|
detailed_info['has_monitoring_tool'] = False
|
||||||
|
return detailed_info
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
['radeontop', '-d', '-', '-l', '1'],
|
['radeontop', '-d', '-', '-l', '1'],
|
||||||
@@ -1674,6 +1703,20 @@ def get_detailed_gpu_info(gpu):
|
|||||||
|
|
||||||
# NVIDIA GPU - use nvidia-smi
|
# NVIDIA GPU - use nvidia-smi
|
||||||
elif vendor == 'NVIDIA':
|
elif vendor == 'NVIDIA':
|
||||||
|
try:
|
||||||
|
check_result = subprocess.run(['which', 'nvidia-smi'], capture_output=True, timeout=1)
|
||||||
|
if check_result.returncode != 0:
|
||||||
|
detailed_info['has_monitoring_tool'] = False
|
||||||
|
print(f"[v0] nvidia-smi not found for NVIDIA GPU")
|
||||||
|
return detailed_info
|
||||||
|
else:
|
||||||
|
detailed_info['has_monitoring_tool'] = True
|
||||||
|
print(f"[v0] nvidia-smi found for NVIDIA GPU")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"[v0] Error checking for nvidia-smi: {e}")
|
||||||
|
detailed_info['has_monitoring_tool'] = False
|
||||||
|
return detailed_info
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
['nvidia-smi', '--query-gpu=index,name,driver_version,memory.total,memory.used,memory.free,temperature.gpu,power.draw,power.limit,utilization.gpu,utilization.memory,clocks.gr,clocks.mem,pcie.link.gen.current,pcie.link.width.current',
|
['nvidia-smi', '--query-gpu=index,name,driver_version,memory.total,memory.used,memory.free,temperature.gpu,power.draw,power.limit,utilization.gpu,utilization.memory,clocks.gr,clocks.mem,pcie.link.gen.current,pcie.link.width.current',
|
||||||
@@ -1872,7 +1915,7 @@ def get_gpu_info():
|
|||||||
current_adapter = line.replace('Adapter:', '').strip()
|
current_adapter = line.replace('Adapter:', '').strip()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Look for GPU-related sensors (nouveau, amdgpu, radeon, i915, etc.)
|
# Look for GPU-related sensors (nouveau, amdgpu, radeon, i915)
|
||||||
if ':' in line and not line.startswith(' '):
|
if ':' in line and not line.startswith(' '):
|
||||||
parts = line.split(':', 1)
|
parts = line.split(':', 1)
|
||||||
sensor_name = parts[0].strip()
|
sensor_name = parts[0].strip()
|
||||||
@@ -1891,8 +1934,8 @@ def get_gpu_info():
|
|||||||
('i915' in current_adapter.lower() and gpu['vendor'] == 'Intel')):
|
('i915' in current_adapter.lower() and gpu['vendor'] == 'Intel')):
|
||||||
|
|
||||||
# Parse temperature (only if not already set by nvidia-smi)
|
# Parse temperature (only if not already set by nvidia-smi)
|
||||||
if '°C' in value_part or 'C' in value_part:
|
if 'temperature' not in gpu or gpu['temperature'] is None:
|
||||||
if 'temperature' not in gpu or gpu['temperature'] is None:
|
if '°C' in value_part or 'C' in value_part:
|
||||||
temp_match = re.search(r'([+-]?[\d.]+)\s*°?C', value_part)
|
temp_match = re.search(r'([+-]?[\d.]+)\s*°?C', value_part)
|
||||||
if temp_match:
|
if temp_match:
|
||||||
gpu['temperature'] = float(temp_match.group(1))
|
gpu['temperature'] = float(temp_match.group(1))
|
||||||
@@ -1949,7 +1992,7 @@ def get_disk_hardware_info(disk_name):
|
|||||||
disk_info['serial'] = serial
|
disk_info['serial'] = serial
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"[v0] Error getting disk driver info: {e}")
|
print(f"[v0] Error getting disk driver info: {e}")
|
||||||
|
|
||||||
# Get SMART data
|
# Get SMART data
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(['smartctl', '-i', f'/dev/{disk_name}'],
|
result = subprocess.run(['smartctl', '-i', f'/dev/{disk_name}'],
|
||||||
|
@@ -103,6 +103,10 @@ export interface GPU {
|
|||||||
utilization_memory?: number
|
utilization_memory?: number
|
||||||
clock_graphics?: string
|
clock_graphics?: string
|
||||||
clock_memory?: string
|
clock_memory?: string
|
||||||
|
engine_render?: number
|
||||||
|
engine_blitter?: number
|
||||||
|
engine_video?: number
|
||||||
|
engine_video_enhance?: number
|
||||||
pcie_gen?: string
|
pcie_gen?: string
|
||||||
pcie_width?: string
|
pcie_width?: string
|
||||||
fan_speed?: number
|
fan_speed?: number
|
||||||
@@ -112,6 +116,7 @@ export interface GPU {
|
|||||||
name: string
|
name: string
|
||||||
memory: string
|
memory: string
|
||||||
}>
|
}>
|
||||||
|
has_monitoring_tool?: boolean
|
||||||
note?: string
|
note?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user