2
0

MonitorCommand.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
  2. <html>
  3. <head>
  4. <link type="text/css" rel="stylesheet" href="style.css" />
  5. </head>
  6. <body>
  7. <div id="page">
  8. <div id='header'>
  9. <a href="index.html">
  10. <img style="border:none" alt="Redis Documentation" src="redis.png">
  11. </a>
  12. </div>
  13. <div id="pagecontent">
  14. <div class="index">
  15. <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
  16. <b>MonitorCommand: Contents</b><br>&nbsp;&nbsp;<a href="#MONITOR">MONITOR</a><br>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Return value">Return value</a>
  17. </div>
  18. <h1 class="wikiname">MonitorCommand</h1>
  19. <div class="summary">
  20. </div>
  21. <div class="narrow">
  22. &iuml;&raquo;&iquest;#sidebar <a href="ControlCommandsSidebar.html">ControlCommandsSidebar</a><h1><a name="MONITOR">MONITOR</a></h1><blockquote>MONITOR is a debugging command that outputs the whole sequence of commandsreceived by the Redis server. is very handy in order to understandwhat is happening into the database. This command is used directlyvia telnet.</blockquote>
  23. <pre class="codeblock python" name="code">
  24. % telnet 127.0.0.1 6379
  25. Trying 127.0.0.1...
  26. Connected to segnalo-local.com.
  27. Escape character is '^]'.
  28. MONITOR
  29. +OK
  30. monitor
  31. keys *
  32. dbsize
  33. set x 6
  34. foobar
  35. get x
  36. del x
  37. get x
  38. set key_x 5
  39. hello
  40. set key_y 5
  41. hello
  42. set key_z 5
  43. hello
  44. set foo_a 5
  45. hello
  46. </pre><blockquote>The ability to see all the requests processed by the server is useful in orderto spot bugs in the application both when using Redis as a database and asa distributed caching system.</blockquote>
  47. <blockquote>In order to end a monitoring session just issue a QUIT command by hand.</blockquote>
  48. <h2><a name="Return value">Return value</a></h2><b>Non standard return value</b>, just dumps the received commands in an infinite flow.
  49. </div>
  50. </div>
  51. </div>
  52. </body>
  53. </html>