Is it possible to monitor only one database?

What about this?

redis-cli monitor |grep '(db 1)'

That way you would just get the output of DB 1


Databases in redis are not at all like databases in SQL. They are essentially just a predefined key prefix with no configuration of their own.

If you only want to see changes to the real data, you will need to set it up as a separate instance so that session data goes to a different process.

There isn't much overhead in doing this (in most scenarios it will actually improve performance) and there are other good reasons for using multiple instances. For example you probably want your real data written to disk in real time and backed up, but session data is worthless after a server restart so doesn't need to be saved to disk at all. With a shared instance you would have to save and back up everything, which isn't particularly good for performance with session data changing much more than permanent data.

Tags:

Redis