Observability

What the server is spending its time on: the slow log, latency monitoring and hot keys.

19 commands in KiviDB 1.1.2. Every command.

  • HOTKEYS: Finds the keys that use the most CPU time, or the most network bytes, during a session started with HOTKEYS START.
    • HOTKEYS GET: Returns the current or latest session: whether it is still running, its settings, its totals, and the top keys by CPU time (by-cpu-time-us) and by network bytes (by-net-bytes).
    • HOTKEYS HELP: Lists the HOTKEYS subcommands and what each does.
    • HOTKEYS RESET: Discards a stopped session's results.
    • HOTKEYS START: Starts a session that tracks, per key, the metrics named: CPU (CPU time) and NET (network bytes).
    • HOTKEYS STOP: Stops the session.
  • LATENCY: The latency monitor: it records, for each kind of event, the times it took longer than latency-monitor-threshold milliseconds, which is 0, off, by default.
    • LATENCY DOCTOR: Reports, in words, the events whose latest samples were slow: as warnings from 100 ms, as critical from 500 ms.
    • LATENCY GRAPH: Draws an event's samples as a small text chart, with the highest and lowest.
    • LATENCY HELP: Lists the LATENCY subcommands and what each does.
    • LATENCY HISTOGRAM: Returns, for each command named, or every command called, its number of calls and how many of them took less than each power of two of microseconds.
    • LATENCY HISTORY: Returns an event's samples, oldest first, each the Unix time and the milliseconds; an empty array for an event with none.
    • LATENCY LATEST: Returns each event's latest sample: the event, the Unix time, and the milliseconds it took.
    • LATENCY RESET: Clears the samples of every event, or of the events named.
  • SLOWLOG: The slow log: the commands that took longer than slowlog-log-slower-than microseconds to run, up to slowlog-max-len entries (128 by default).
    • SLOWLOG GET: Returns the newest entries of the slow log: 10, count, or all of them with -1.
    • SLOWLOG HELP: Lists the SLOWLOG subcommands and what each does.
    • SLOWLOG LEN: Returns how many entries the slow log holds.
    • SLOWLOG RESET: Empties the slow log.