# SLOWLOG

> Read and manage the log of commands that took longer than a set time to run.

URL: https://docs.hotkv.com/commands/slowlog/

```
SLOWLOG subcommand [argument ...]
```

- Group: Server
- HotKV Cloud: all plans
- On-Premise: no license needed

The slow log records every command whose execution took at least
`slowlog-log-slower-than` microseconds (10000, that is 10 ms, by default).
Execution time is the time the server spent running the command, not
including network time or time spent waiting in a queue. A negative value
turns the log off, and `0` records every command.

The log keeps the newest `slowlog-max-len` entries (128 by default). Both
settings can be changed at runtime with [CONFIG SET](https://docs.hotkv.com/commands/config-set/index.md).
Each entry stores at most 32 arguments, each cut to 128 bytes, as Redis
does. `SLOWLOG HELP` lists the subcommands.

## Subcommands

| Subcommand | What it does |
| --- | --- |
| [SLOWLOG GET](https://docs.hotkv.com/commands/slowlog-get/index.md) | The newest entries, in Redis's format. |
| [SLOWLOG LEN](https://docs.hotkv.com/commands/slowlog-len/index.md) | The number of entries. |
| [SLOWLOG RESET](https://docs.hotkv.com/commands/slowlog-reset/index.md) | Clear the log. |
| [SLOWLOG EXPORT](https://docs.hotkv.com/commands/slowlog-export/index.md) | Every entry as JSON, with user, tenant and database. HotKV only. |

An unknown subcommand gets `ERR unknown subcommand '<name>'. Try SLOWLOG HELP.`

## Compatibility

Same behaviour and settings as Redis 7 and Valkey 8. `SLOWLOG EXPORT` is a
HotKV addition.

## See also

[LATENCY](https://docs.hotkv.com/commands/latency/index.md), [MONITOR](https://docs.hotkv.com/commands/monitor/index.md),
[troubleshooting](https://docs.hotkv.com/operate/troubleshooting/index.md)