Skip to content

Commit

Permalink
[memcached] Collect from memcached using the tool
Browse files Browse the repository at this point in the history
Signed-off-by: Arif Ali <[email protected]>
  • Loading branch information
arif-ali authored and TurboTurtle committed Jun 16, 2024
1 parent 21527d7 commit 606bd81
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions sos/report/plugins/memcached.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ class Memcached(Plugin):
profiles = ('webserver',)
packages = ('memcached',)

mm_tool = "memcached-tool"

def setup(self):
host = "127.0.0.1:11211"

subcmds = [
"display",
"dump",
"keys",
"stats",
"settings",
]

self.add_cmd_output([
f"{self.mm_tool} {host} {subcmd}" for subcmd in subcmds])


class RedHatMemcached(Memcached, RedHatPlugin):

Expand All @@ -35,6 +51,7 @@ class DebianMemcached(Memcached, DebianPlugin, UbuntuPlugin):
files = ('/etc/default/memcached',)

def setup(self):
self.mm_tool = "/usr/share/memcached/scripts/memcached-tool"
super().setup()
self.add_copy_spec([
"/etc/memcached.conf",
Expand Down

0 comments on commit 606bd81

Please sign in to comment.