Cleaned up dashboard
This commit is contained in:
@@ -47,9 +47,9 @@ async function checkNvidiaSmi(): Promise<boolean> {
|
||||
}
|
||||
|
||||
async function getGpuStats() {
|
||||
// Get detailed GPU information in JSON format
|
||||
// Get detailed GPU information in JSON format including fan speed
|
||||
const { stdout } = await execAsync(
|
||||
'nvidia-smi --query-gpu=index,name,driver_version,temperature.gpu,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used,power.draw,power.limit,clocks.current.graphics,clocks.current.memory --format=csv,noheader,nounits',
|
||||
'nvidia-smi --query-gpu=index,name,driver_version,temperature.gpu,utilization.gpu,utilization.memory,memory.total,memory.free,memory.used,power.draw,power.limit,clocks.current.graphics,clocks.current.memory,fan.speed --format=csv,noheader,nounits',
|
||||
);
|
||||
|
||||
// Parse CSV output
|
||||
@@ -71,6 +71,7 @@ async function getGpuStats() {
|
||||
powerLimit,
|
||||
clockGraphics,
|
||||
clockMemory,
|
||||
fanSpeed,
|
||||
] = line.split(', ').map(item => item.trim());
|
||||
|
||||
return {
|
||||
@@ -95,8 +96,11 @@ async function getGpuStats() {
|
||||
graphics: parseInt(clockGraphics),
|
||||
memory: parseInt(clockMemory),
|
||||
},
|
||||
fan: {
|
||||
speed: parseInt(fanSpeed), // Fan speed as percentage
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
return gpus;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
'use client';
|
||||
|
||||
import GpuMonitor from '@/components/GPUMonitor';
|
||||
import JobsTable from '@/components/JobsTable';
|
||||
import { TopBar, MainContent } from '@/components/layout';
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function Dashboard() {
|
||||
return (
|
||||
@@ -14,6 +16,15 @@ export default function Dashboard() {
|
||||
</TopBar>
|
||||
<MainContent>
|
||||
<GpuMonitor />
|
||||
<div className="w-full mt-4">
|
||||
<div className="flex justify-between items-center mb-2">
|
||||
<h1 className="text-md">Active Jobs</h1>
|
||||
<div className="text-xs text-gray-500">
|
||||
<Link href="/jobs">View All</Link>
|
||||
</div>
|
||||
</div>
|
||||
<JobsTable onlyActive />
|
||||
</div>
|
||||
</MainContent>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user