# SLOWLOG LEN

> Return the number of entries in the slow log.

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

```
SLOWLOG LEN
```

- Group: Server
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`SLOWLOG LEN` returns how many entries the slow log holds now. It is never
more than `slowlog-max-len`: once the log is full, each new entry pushes out
the oldest one.

## Return value

An integer, in RESP2 and RESP3.

## Examples

```
127.0.0.1:6379> SLOWLOG LEN
(integer) 42
```

## Compatibility

Same as Redis 7 and Valkey 8.

## See also

[SLOWLOG GET](https://docs.hotkv.com/commands/slowlog-get/index.md), [SLOWLOG RESET](https://docs.hotkv.com/commands/slowlog-reset/index.md)