System status
dkit status
A live dashboard that refreshes every second:
- CPU: overall load with a history graph, chip name and core count, and a few temperatures where the machine reports them
- Memory: RAM and swap in use
- Disks: used and free space per disk, and how much is being read and written
- Network: download and upload speed of the busiest connection, with a history graph
- Battery, on the top line: charge, whether it is charging, the time the system estimates, cycle count and how much a full charge holds against the design
- Processes: the busiest programs
A reading the system does not give is left out. It is never shown as zero, and nothing is estimated in its place: a desktop shows no battery, and a machine without readable sensors shows no temperatures.
| Key | Action |
|---|---|
c |
Sort processes by CPU |
m |
Sort processes by memory |
q or esc |
Quit |
One-off snapshot
dkit status --plain # print once and exit
dkit status --plain --top 10 # list ten processes instead of five
dkit status --json # the same data for scripts
dkit status also prints once, without the dashboard, whenever its output is piped or redirected.
A stream for programs
dkit status --json --watch # one JSON object per line, every 2 seconds
dkit status --json --watch --interval 10 # every 10 seconds
dkit status --json --watch --count 30 # stop after 30 lines
With --watch, dkit status --json keeps going: it prints one snapshot per line, each a complete JSON object with the same fields as the one-off --json report, and sends each line as soon as it is taken. It runs until you interrupt it (ctrl-c), until --count lines have been printed, or until whatever was reading it stops:
dkit status --json --watch | head -n 5 # ends quietly after five lines
--interval SECONDSis the time between lines. The default is 2 seconds. Decimals work (--interval 0.5). Anything under 0.2 seconds is refused: CPU load is the change between two readings of the system’s counters, and closer together than that the figures would be wrong, not fresher. The longest is a day.- The first line comes after about 0.2 seconds, measured over that short window exactly as the one-off report is, so its CPU load and network speeds are real figures and not zeros. Every later line covers the interval since the line before.
--watchneeds--json. With--plain, or on its own, it is refused with a message saying so: repeating the text report would only scroll the terminal, and the dashboard is the live view for a person.--intervaland--countonly mean something with--watchand are refused without it.
Battery, temperatures and disk activity
These are readings, stated as the system gives them. There is no score and no verdict on them.
| Reading | macOS | Linux | Windows |
|---|---|---|---|
| Battery charge, state, time left | pmset -g batt |
/sys/class/power_supply |
not read yet |
| Battery cycle count, capacity against design | the battery’s entry in ioreg |
/sys/class/power_supply |
not read yet |
| Temperatures | the machine’s sensors | the kernel’s hwmon sensors |
the system’s thermal zones, where it exposes any |
| Disk reading and writing | the disk driver’s counters | /proc/diskstats |
the disk’s performance counters |
With --json:
batteryisnullwhen there is no battery or it cannot be read. Otherwise it hascharge_percent,state(charging,discharging,full,not_chargingorunknown),on_mains,time_to_empty_secs,time_to_full_secs,cycle_countandhealth_percent. Any of the last five can benull.health_percentis what a full charge holds now as a percentage of what it held when new; it moves a little from reading to reading and can be just over 100 on a new battery.temperaturesis every sensor the machine reports, each with thelabelthe system gives it andcelsius. It is empty when there are none. The dashboard and the text report show three: the processor’s first, then the warmest of the rest, counting sensors named alike (PMU tdie1,PMU tdie2) as one.disk_iohasread_bytes_per_secandwritten_bytes_per_secacross all disks, over the time since the sample before. Each entry ofdiskshas the same two underio. Either isnullwhen the system gives no counters.
Good to know about these:
- The battery is read at most every 30 seconds, however often the dashboard or
--watchsamples. On macOS each reading starts two of the system’s own tools, which is too much to do once a second, and the charge does not move faster than that. A plug going in or out can therefore show up to half a minute late. - Temperatures are read at most every 5 seconds.
- Time left is the system’s own estimate and only appears when the system gives one. On Linux most drivers give none; it is not worked out from the power draw.
- Sensor names are the system’s, and say what they say:
PMU tdie1on a Mac,coretemp Package id 0on Linux. A sensor that answers with a value no working sensor can have (below -50 °C or above 200 °C) is left out. - Volumes on the same disk report that disk’s activity, so on a Mac the startup disk’s figures are the whole internal disk’s. The total counts volumes whose counters agree as one disk.
- Windows reports no battery yet. Temperatures there depend on what the system exposes, which is often nothing without administrator rights.
- A Linux machine with two batteries shows the first.
Good to know
- A process’s CPU figure is a share of one core, so a program using several cores can show more than 100%.
- Network speed is shown for the busiest connection only. Adding connections together would count VPN traffic twice.
- On macOS the startup disk appears once. The separate system and data volumes macOS creates behind it are folded together.
From docs/commands/status.md at v0.1.0-alpha.2.