Skip to content

Add 'list_namespaces_io_stats' grpc call#1769

Open
VallariAg wants to merge 1 commit intoceph:develfrom
VallariAg:add-ns_list_io_stats
Open

Add 'list_namespaces_io_stats' grpc call#1769
VallariAg wants to merge 1 commit intoceph:develfrom
VallariAg:add-ns_list_io_stats

Conversation

@VallariAg
Copy link
Member

@VallariAg VallariAg commented Feb 11, 2026

And make namespace_get_io_stats grpc method
wrapper around list_namespaces_io_stats.

Also change "namespace get_io_stats" cli cmd
output from dictionary of bdev stats to list
of bdev stats. Make --nsid & --subsystem optional
args, and return single device stats if present.
Otherwise, return all bdev stats in a list.

Copilot AI review requested due to automatic review settings February 11, 2026 11:03
@github-project-automation github-project-automation bot moved this to 🆕 New in NVMe-oF Feb 11, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Gateway gRPC API to fetch I/O stats across all namespaces (via SPDK bdev iostat) and exposes it through a new CLI subcommand.

Changes:

  • Extend Gateway gRPC service with list_namespaces_io_stats and new response messages for aggregated bdev I/O stats.
  • Implement list_namespaces_io_stats handler in the Python gRPC server using spdk_rpc_client.bdev_get_iostat().
  • Add CLI command namespace ns_list_io_stats to display aggregated I/O stats in text/table or structured formats.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
control/proto/gateway.proto Adds new RPC + request/response messages for listing all namespaces’ I/O stats.
control/grpc.py Implements the new RPC by calling SPDK bdev_get_iostat and mapping the result into the proto response.
control/cli.py Adds a new namespace subcommand that calls the new RPC and formats the output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-project-automation github-project-automation bot moved this from 🆕 New to 👍 Ready to merge in NVMe-oF Feb 11, 2026
Copy link
Collaborator

@gbregman gbregman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need separate commands for one namespace and all the namespaces? We don't do that in other cases. We just rely on "--nsid" to execute the command for one namespace or all.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

control/cli.py:3009

  • The JSON output structure for the CLI command 'namespace get_io_stats' has changed significantly. Previously, when querying a specific namespace with --subsystem and --nsid, the JSON output included top-level fields like 'subsystem_nqn', 'nsid', 'uuid', and 'bdev_name', along with the stats. Now, the stats are returned in a 'namespaces' array, and these identifying fields are no longer present in the JSON output. This is a breaking change for any scripts or tools that parse the JSON output of this CLI command. Consider documenting this breaking change in the PR description or release notes, and consider whether the old format should be preserved for backward compatibility.
        elif args.format == "json" or args.format == "yaml":
            ret_str = json_format.MessageToJson(ns_io_stats, indent=4,
                                                including_default_value_fields=True,
                                                preserving_proto_field_name=True)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

And make namespace_get_io_stats grpc method
wrapper around list_namespaces_io_stats.

Also change "namespace get_io_stats" cli cmd
output from dictionary of bdev stats to list
of bdev stats. Make --nsid & --subsystem optional
args, and return single device stats if present.
Otherwise, return all bdev stats in a list.

Signed-off-by: Vallari Agrawal <val.agl002@gmail.com>
@VallariAg VallariAg force-pushed the add-ns_list_io_stats branch from 6ebdf77 to b94454d Compare February 16, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👍 Ready to merge

Development

Successfully merging this pull request may close these issues.

2 participants