MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / infoCommand

Function infoCommand

src/server.cpp:6406–6416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6404}
6405
6406void infoCommand(client *c) {
6407 const char *section = c->argc == 2 ? (const char*)ptrFromObj(c->argv[1]) : "default";
6408
6409 if (c->argc > 2) {
6410 addReplyErrorObject(c,shared.syntaxerr);
6411 return;
6412 }
6413 sds info = genRedisInfoString(section);
6414 addReplyVerbatim(c,info,sdslen(info),"txt");
6415 sdsfree(info);
6416}
6417
6418void monitorCommand(client *c) {
6419 serverAssert(GlobalLocksAcquired());

Callers

nothing calls this directly

Calls 6

ptrFromObjFunction · 0.85
addReplyErrorObjectFunction · 0.85
genRedisInfoStringFunction · 0.85
addReplyVerbatimFunction · 0.85
sdslenFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected