Forráskód Böngészése

cmd_shm: added subcommand for shm related rpc commands

Daniel-Constantin Mierla 5 éve
szülő
commit
1b052fa0cf
1 módosított fájl, 35 hozzáadás és 0 törlés
  1. 35 0
      kamcli/commands/cmd_shm.py

+ 35 - 0
kamcli/commands/cmd_shm.py

@@ -0,0 +1,35 @@
+import click
+from kamcli.cli import pass_context
+from kamcli.iorpc import command_ctl
+
+
[email protected](
+    "shm",
+    help="Shared memory (shm) management",
+    short_help="Shared memory (shm) management",
+)
+@pass_context
+def cli(ctx):
+    pass
+
+
[email protected]("stats", short_help="Show the stats for shared (shm) memory")
+@pass_context
+def shm_stats(ctx):
+    """Show the stats for shared (shm) memory
+
+    \b
+    """
+    command_ctl(ctx, "shm.stats", [])
+
+
[email protected](
+    "info", short_help="Show the info for shared (shm) memory manager"
+)
+@pass_context
+def shm_info(ctx):
+    """Show the info for shared (shm) memory manager
+
+    \b
+    """
+    command_ctl(ctx, "shm.info", [])