shadcn.io is not affiliated with official shadcn/ui
GPU Utilization Monitoring Block for Svelte
One accelerator over the last 60 seconds: video memory as a stacked bar by process, compute and memory lines with their limits and one shared cursor, a power bar and a table of processes.
Installation
Overview
See who holds the memory on a GPU, with this utilization panel for Svelte with Ark UI. It is Vramlight, an accelerator memory monitor (made up), watching one device for 60 seconds. The first band is the 40 GB of video memory as one stacked bar by process: training job, eval job, notebook, exporter and free, told apart by weight. Under it two small lines, compute use and memory use, each with its limit drawn as a line, share one cursor: a native range named Second that reads both values at that second. Power is a thin bar, "245 W of 400 W", and a native table lists the processes with pid, memory and compute share. The header sentence is worked out from the typed processes. Guides draw the frame and its bands; the entrance is CSS only. For ML platform teams, training dashboards and shared GPU hosts.
FAQ
How do I use my own device data?
Edit PROCS (each process has its memory in gigabytes and its compute share) and TOTAL_GB. The two 60-second series are built at the top of the file from small noise helpers and end on the numbers worked out from PROCS; replace COMPUTE and VRAM with your own arrays of 60 values. The memory percentage, the free amount and the header sentence are derived.
How does the cursor work?
It is a native range under the lines, named Second, whose value text is the second and both readings. Arrow keys move it one second, Home and End jump, and dragging scrubs it. It starts on the dip in compute use so the first screen shows the story. The line under the slider updates at once; a polite status line speaks it about 600 ms after the last change.
What are the two limit lines?
The compute line has a typed line at 90% ("Busy above 90%") and the memory line has the 40 GB installed, so a reader sees how close each is to its ceiling. They are data, not controls.
What is real here and what is typed?
All of it is typed: no device is queried, and the product and process names are made up. Nothing here kills a process or changes a limit.