brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: redis-cli monitor streams every command, so stop it after a few lines on a busy cache

Cache
~/tips/tip-cache-redis-monitor-head-caution

redis-cli monitor | head -n 20

Shows live Redis commands for a moment while keeping the load on a busy server small.

MONITOR is the quickest way to see which keys an application touches, and the quickest way to slow Redis down.

redis-cli monitor | head -n 20

MONITOR echoes each command the server receives, with arguments. The Redis documentation reports that one running monitor can cut throughput by more than half in its benchmark. Piping into head -n 20 ends the session after twenty lines of traffic, and Ctrl-C stops it earlier. The output contains the keys and values of live traffic, which may include session data or tokens, so do not paste it into a ticket without checking it. Use redis-cli --latency if you only want to measure delay.

Further reading: Redis: MONITOR command

Going deeper: Guide: your Unraid cache is full and Docker stopped, how to find out why and fix it

More Cache tips fincore /var/lib/example/data.db npm cache verify fc-cache -f -v ~/.local/share/fonts proxy_cache app; Cache-Control: no-cache All Cache tips (24) All topics

Link