How to end Redis monitoring
Asked Answered
A

2

6

In Redis there's a MONITOR command that is quite handy to watch all the commands that are being processed.

Once you've started monitoring, is there any way to stop monitoring from the same session?

If you kill the connection, does the monitoring end (as opposed to resource-intensive monitoring continuing on the server)?

Anglicism answered 17/2, 2015 at 12:29 Comment(0)
B
12

There is no API to do it - just close the connection.

The redis-cli command does not implement anything specific when the user hits CTRL-C to interrupt the program. Closing the connection should stop the monitoring.

Bionics answered 18/2, 2015 at 13:4 Comment(1)
I find that doing this closes the CLI, not just the monitor command. Others have been reporting the same for some years (github.com/redis/redis/issues/2794), and while there's mention of a fix from 2019, I'm on the latest CLI (version 6.0.16) but the problem remains.Facesaving
M
-1

just press Ctrl + C

it will end redis-cli monitor.....

Modica answered 8/6, 2023 at 2:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.