I need to get the "CLIENT LIST" output from redis console to be used in my c# application, is there a way to execute that command with the ConnectionMultiplexer? Or is there a built in method to find that information?
CLIENT LIST is a "server" command, not a "database" command (as differentiated here), so you need to use IServer / GetServer() instead of IDatabase / GetDatabase(). The link shown also shows how to do this. Once you have that: there are ClientList and ClientListAsync methods that deal with all the parsing into a ClientInfo instance.
If it wasn't there, then the fallback options would be IDatabase.Execute[Async] (to issue an arbitrary raw command) or IDatabase.ScriptEvaluate[Async] (to issue Lua script).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With