Stats
urdeck.widgets.stats shows readings from any data provider: a large value with its unit and a label, optionally inside
a gauge. Its settings are a list of slots that fill the positions of the card’s size in order.
4x4 Four gauges above three text readings.4x2 Two readings on top, three text readings below.2x2 One reading on a square card.2x1 2 cells wide and 1 tall.1x1 One reading on one cell, which also fits a slot of the dock.| Size | Positions |
|---|---|
| 1x1, 2x1, 2x2 | one reading (slot 1) |
| 4x2 | two gauges side by side (slots 1 and 2) above three text stats (slots 3 to 5) |
| 4x4 | four gauges in two rows (slots 1 to 4) above three text stats (slots 5 to 7) |
Slots beyond the positions of the size stay in the file; a position without a slot stays empty.
{ "typeId": "urdeck.widgets.stats", "col": 0, "row": 2, "slots": [ { "reading": "system:cpu/core/2/load" } ] }
A 4x4 performance card: four gauges (CPU load, GPU temperature and load, memory load) above three text stats (the GPU’s power and clock, and the CPU’s first core):
{ "typeId": "urdeck.widgets.stats", "col": 0, "row": 0, "width": 4, "height": 4, "slots": [
{ "reading": "system:cpu/load" }, { "reading": "system:gpu/temperature" },
{ "reading": "system:gpu/load" }, { "reading": "system:memory/load", "label": "RAM" },
{ "reading": "system:gpu/power" }, { "reading": "system:gpu/clock" }, { "reading": "system:cpu/core/1/load" } ] }
Settings
In the editor, add the widget on Pages and select it: the pane on the right shows these settings with a control for each. The file keys are listed for reference.
| Setting | Value | Default | Meaning |
|---|---|---|---|
slots | list | The readings to show, filling the positions of the card's size in order. Readings beyond the positions stay in the file. |
Each item of slots
| Setting | Value | Default | Meaning |
|---|---|---|---|
reading | a reading id, provider:path | "" | The reading to show, written provider:path (system:cpu/core/2/load). |
label | text | The name under or beside the value. Left out, it is the reading's own label; a text replaces it, and none shows no label. | |
unit | celsius, fahrenheit | The unit to show a reading in when it has several, such as a temperature in Celsius or Fahrenheit. Left out, it is the reading's default, then the region's. | |
decimals | whole number from 0 to 3 | How many decimals to show. Left out: Automatic. | |
style | plain, gauge, ring, bar, verticalBar, meter, tach, marker, thickbar | How the value is drawn. Automatic is plain at the small sizes and the theme's gauge in a gauge position. A reading with no range to measure against is always plain. Text positions are always plain. (text positions). | |
min | number | The value where the gauge is empty, replacing the one the reading declares. | |
max | number | The value where the gauge is full, replacing the one the reading declares. | |
warning | number | From this value on the gauge is drawn in the theme's warning colour. Left out: Off. | |
critical | number | From this value on the gauge is drawn in the theme's critical colour. Left out: Off. |
Each slot is an object with the settings in the table headed “Each item of slots” (reading, label, unit, decimals, style, min, max,
warning and critical). With no slot the widget shows system:cpu/load.
The fill eases to a new value over about 300 ms; the number and the colour change at once.
A theme can ask a gauge for two more parts. With gauge.status the label’s row also carries a short status word (OK, WARM,
HOT in the themes that use it), chosen from the gauge’s fraction by the theme’s thresholds; a slot that sets warning or
critical is judged by those instead. With gauge.sparkline a line of the last minute or so is drawn under the number; Stats
keeps that history itself, one value a second, only for a gauge the theme gives a sparkline and that is tall enough for it, and
it starts again when the slot’s reading or the settings change. See the theme reference.
The system readings
The system provider needs no administrator rights.
| Reading | Meaning |
|---|---|
system:cpu/load |
The share of time all logical processors are busy, in percent. |
system:cpu/core/N/load |
The same for logical processor N, counted from 1. |
system:memory/load |
Memory in use, in percent. |
system:processes/top |
A list: the ten processes using the most processor time, most first, each with its CPU share and memory. Shown by the List widget; in a Stats slot it is the number of rows. |
system:gpu/load, system:gpu/temperature, system:gpu/power, system:gpu/clock |
The main GPU (the one with the most video memory): load in percent, temperature, power in watts and clock in MHz. system:gpu/N/... is each adapter, counted from 1 in that order. |
The process list needs two looks at the machine to work out a share, so it appears about one interval (two seconds) after a widget
starts showing it, and processes are looked at only while a widget shows it. A process is named by its executable without the
extension; the names are shown on the deck and never written to urdeck.log.
CPU load is the share of time the processors are busy, so with a CPU that boosts it reads lower under load than Task Manager, which weighs by clock speed. GPU load is the busiest engine of the adapter, as in Task Manager.
GPU load and temperature come from Windows itself and should work with any vendor, but they have been verified on NVIDIA
only. Power and clock come from the vendor’s library, which today means NVIDIA’s nvml.dll (installed with the
driver); on AMD and Intel they show a dash. urdeck.log names each GPU and the source of each of its readings when it is
first sampled, which is what a hardware report should include.
A reading that does not exist shows a dash and its id. A reading whose provider stopped answering keeps its last value in the dimmed text colour. A provider runs only while a shown widget uses it, and stops five seconds after the last one goes (Home Assistant’s after thirty, so that flipping to another page and back does not reconnect).
The weather provider’s readings can be shown here too, for example
weather:Tokyo/current/temperature, and so can Home Assistant’s, for example
homeassistant:sensor.office_temperature.