w3resource

Redis Server: CONFIG RESETSTAT

Redis CONFIG RESETSTAT Command

Redis CONFIG RESETSTAT command is used to reset the statistics reported by Redis using the INFO command. Following counters can be reset by using this command:

  • Keyspace hits
  • Keyspace misses
  • Number of commands processed
  • Number of connections received
  • Number of expired keys
  • Number of rejected connections
  • Latest fork(2) time
  • The aof_delayed_fsync counter

Here are some common uses and scenarios for the "CONFIG RESETSTAT" command:

  • Reset Statistics: Resets the Redis server's internal statistics counters, such as command calls and memory usage.
  • Performance Monitoring: Useful for starting a fresh monitoring period by clearing old statistics.
  • Diagnostics: Helps in diagnosing performance issues by providing a clean slate for statistics.
  • Data Analysis: Assists in analyzing performance trends by resetting and then tracking statistics over a new period.
  • Troubleshooting: Useful for troubleshooting and identifying performance anomalies by clearing accumulated metrics.

Syntax:

CONFIG RESETSTAT

Available since

2.0.0.

Return Value

String reply, always OK.

Return Value Type

String

Previous: CONFIG SET
Next: DBSIZE



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/redis/redis-server-config-resetstat.php