MCPcopy Create free account
hub / github.com/F-Stack/f-stack / debugCommand

Function debugCommand

app/redis-6.2.6/src/debug.c:385–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383#endif
384
385void debugCommand(client *c) {
386 if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"help")) {
387 const char *help[] = {
388"AOF-FLUSH-SLEEP <microsec>",
389" Server will sleep before flushing the AOF, this is used for testing.",
390"ASSERT",
391" Crash by assertion failed.",
392"CHANGE-REPL-ID"
393" Change the replication IDs of the instance.",
394" Dangerous: should be used only for testing the replication subsystem.",
395"CONFIG-REWRITE-FORCE-ALL",
396" Like CONFIG REWRITE but writes all configuration options, including",
397" keywords not listed in original configuration file or default values.",
398"CRASH-AND-RECOVER <milliseconds>",
399" Hard crash and restart after a <milliseconds> delay.",
400"DIGEST",
401" Output a hex signature representing the current DB content.",
402"DIGEST-VALUE <key> [<key> ...]",
403" Output a hex signature of the values of all the specified keys.",
404"ERROR <string>",
405" Return a Redis protocol error with <string> as message. Useful for clients",
406" unit tests to simulate Redis errors.",
407"LOG <message>",
408" Write <message> to the server log.",
409"HTSTATS <dbid>",
410" Return hash table statistics of the specified Redis database.",
411"HTSTATS-KEY <key>",
412" Like HTSTATS but for the hash table stored at <key>'s value.",
413"LOADAOF",
414" Flush the AOF buffers on disk and reload the AOF in memory.",
415"LUA-ALWAYS-REPLICATE-COMMANDS <0|1>",
416" Setting it to 1 makes Lua replication defaulting to replicating single",
417" commands, without the script having to enable effects replication.",
418#ifdef USE_JEMALLOC
419"MALLCTL <key> [<val>]",
420" Get or set a malloc tuning integer.",
421"MALLCTL-STR <key> [<val>]",
422" Get or set a malloc tuning string.",
423#endif
424"OBJECT <key>",
425" Show low level info about `key` and associated value.",
426"OOM",
427" Crash the server simulating an out-of-memory error.",
428"PANIC",
429" Crash the server simulating a panic.",
430"POPULATE <count> [<prefix>] [<size>]",
431" Create <count> string keys named key:<num>. If <prefix> is specified then",
432" it is used instead of the 'key' prefix.",
433"DEBUG PROTOCOL <type>",
434" Reply with a test value of the specified type. <type> can be: string,",
435" integer, double, bignum, null, array, set, map, attrib, push, verbatim,",
436" true, false.",
437"RELOAD [option ...]",
438" Save the RDB on disk and reload it back to memory. Valid <option> values:",
439" * MERGE: conflicting keys will be loaded from RDB.",
440" * NOFLUSH: the existing database will not be removed before load, but",
441" conflicting keys will generate an exception and kill the server."
442" * NOSAVE: the database will be loaded from an existing RDB file.",

Callers

nothing calls this directly

Calls 15

strcasecmpFunction · 0.85
addReplyHelpFunction · 0.85
restartServerFunction · 0.85
addReplyErrorFunction · 0.85
zmallocFunction · 0.85
addReplyFunction · 0.85
sdsdupFunction · 0.85
rdbPopulateSaveInfoFunction · 0.85
rdbSaveFunction · 0.85
addReplyErrorObjectFunction · 0.85
emptyDbFunction · 0.85

Tested by

no test coverage detected