Skip to content

Commit a818883

Browse files
More rabbitmqadmin v2-related updates
1 parent 262c14b commit a818883

File tree

6 files changed

+267
-22
lines changed

6 files changed

+267
-22
lines changed

docs/cli.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ be named `rabbitmqctl.bat`.
5656

5757
Additional tools are optional and can be obtained from GitHub:
5858

59-
* [`rabbitmqadmin`](./management-cli) for operator tasks over [HTTP API](./management)
59+
* [`rabbitmqadmin` v2](./management-cli) for operator tasks over the [HTTP API](./management#http-api)
6060
* [`rabbitmq-collect-env`](https://github.com/rabbitmq/support-tools) which collects relevant cluster and environment information
6161
as well as server logs. This tool is specific to Linux and UNIX-like operating systems.
6262

@@ -66,7 +66,7 @@ including virtual host, user and permission management, destructive operations
6666
on node's data and so on.
6767

6868
`rabbitmqadmin` is built on top of the HTTP API and uses a different mechanism, and only
69-
requires that the [HTTP API](./management) port is open for outside connections.
69+
requires that the [HTTP API](./management#http-api) port is open for outside connections.
7070

7171
Even though CLI tools ship with the server, most commands [can be used to operate on remote nodes](#remote-nodes).
7272
Plugins can [provide CLI commands](#command-discovery) that will be discovered by CLI tools for explicitly enabled plugins.
@@ -92,8 +92,8 @@ that has RabbitMQ installed.
9292
root is added to `PATH` for simpler interactive use. Non-interactive use cases can use full or relative paths without
9393
modifications to the `PATH` environment variable.
9494

95-
[`rabbitmqadmin`](./management-cli) is a standalone tool (no dependencies other than Python 3)
96-
that can be downloaded from a running node or [directly from GitHub](https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_management/bin/rabbitmqadmin).
95+
[`rabbitmqadmin`](./management-cli) is a standalone tool
96+
that is [distributed via GitHub releases](https://github.com/rabbitmq/rabbitmqadmin-ng/releases).
9797

9898
If interaction from a remote node is required, download and extract the [generic UNIX package](./install-generic-unix)
9999
or use the [Windows installer](./install-windows).
@@ -737,10 +737,10 @@ rabbitmqctl.bat shutdown --node [email protected]
737737
It is not a replacement for `rabbitmqctl` and provides access to a subset of most commonly
738738
performed operations provided by the [management UI](./management).
739739

740-
The tool requires Python 2.7.9 or a more recent version.
740+
`rabbitmqadmin` uses HTTP API authentication mechanism (basic HTTP authentication).
741741

742-
`rabbitmqadmin` uses HTTP API authentication mechanism (basic HTTP authentication). It has to be
743-
downloaded separately from a running node or [GitHub](https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_management/bin/rabbitmqadmin).
742+
It is a native binary and must be [downloaded separately](https://github.com/rabbitmq/rabbitmqadmin-ng/releases) from the RabbitMQ
743+
distribution.
744744

745745

746746
## "Node-local" and "Clusterwide" Commands {#cli-and-clustering}

docs/management-cli.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,87 @@ rabbitmqadmin --vhost "events" delete exchange --name "target.exchange.name"
315315
rabbitmqadmin --vhost "events" delete exchange --name "target.exchange.name" --idempotently
316316
```
317317

318+
### Inspecting Node Memory Breakdown
319+
320+
There are two commands for reasoning about target [node's memory footprint](./memory-use):
321+
322+
```shell
323+
# displays a breakdown in bytes
324+
rabbitmqadmin show memory_breakdown_in_bytes --node 'rabbit@hostname'
325+
```
326+
327+
```shell
328+
# displays a breakdown in percent
329+
rabbitmqadmin show memory_breakdown_in_percent --node 'rabbit@hostname'
330+
```
331+
332+
Example output of `show memory_breakdown_in_percent`:
333+
334+
```
335+
┌────────────────────────────────────────┬────────────┐
336+
│ key │ percentage │
337+
├────────────────────────────────────────┼────────────┤
338+
│ total │ 100% │
339+
├────────────────────────────────────────┼────────────┤
340+
│ Binary heap │ 45.10% │
341+
├────────────────────────────────────────┼────────────┤
342+
│ Allocated but unused │ 23.45% │
343+
├────────────────────────────────────────┼────────────┤
344+
│ Quorum queue ETS tables │ 23.05% │
345+
├────────────────────────────────────────┼────────────┤
346+
│ Other processes │ 5.32% │
347+
├────────────────────────────────────────┼────────────┤
348+
│ Other (used by the runtime) │ 4.98% │
349+
├────────────────────────────────────────┼────────────┤
350+
│ Code │ 4.54% │
351+
├────────────────────────────────────────┼────────────┤
352+
│ Client connections: others processes │ 3.64% │
353+
├────────────────────────────────────────┼────────────┤
354+
│ Management stats database │ 3.48% │
355+
├────────────────────────────────────────┼────────────┤
356+
│ Client connections: reader processes │ 3.22% │
357+
├────────────────────────────────────────┼────────────┤
358+
│ Plugins and their data │ 3.12% │
359+
├────────────────────────────────────────┼────────────┤
360+
│ Other (ETS tables) │ 1.55% │
361+
├────────────────────────────────────────┼────────────┤
362+
│ Metrics data │ 0.66% │
363+
├────────────────────────────────────────┼────────────┤
364+
│ AMQP 0-9-1 channels │ 0.40% │
365+
├────────────────────────────────────────┼────────────┤
366+
│ Message store indices │ 0.27% │
367+
├────────────────────────────────────────┼────────────┤
368+
│ Atom table │ 0.24% │
369+
├────────────────────────────────────────┼────────────┤
370+
│ Client connections: writer processes │ 0.19% │
371+
├────────────────────────────────────────┼────────────┤
372+
│ Quorum queue replica processes │ 0.10% │
373+
├────────────────────────────────────────┼────────────┤
374+
│ Stream replica processes │ 0.07% │
375+
├────────────────────────────────────────┼────────────┤
376+
│ Mnesia │ 0.02% │
377+
├────────────────────────────────────────┼────────────┤
378+
│ Metadata store │ 0.02% │
379+
├────────────────────────────────────────┼────────────┤
380+
│ Stream coordinator processes │ 0.02% │
381+
├────────────────────────────────────────┼────────────┤
382+
│ Classic queue processes │ 0.00% │
383+
├────────────────────────────────────────┼────────────┤
384+
│ Metadata store ETS tables │ 0.00% │
385+
├────────────────────────────────────────┼────────────┤
386+
│ Stream replica reader processes │ 0.00% │
387+
├────────────────────────────────────────┼────────────┤
388+
│ Reserved by the kernel but unallocated │ 0.00% │
389+
└────────────────────────────────────────┴────────────┘
390+
```
391+
392+
Note that there are [two different supported strategies](./memory-use#strategies)
393+
for computing memory footprint of a node. `rabbitmqadmin` will use the greater value
394+
for 100% when computing the relative share in percent for each category.
395+
396+
Other factors that can affect the precision of percentage values reported are [runtime allocator](./memory-use#preallocated-memory)
397+
behavior nuances and the [kernel page cache](./memory-use#page-cache).
398+
318399
### List feature flags and their state
319400

320401
```shell

versioned_docs/version-3.13/cli.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ be named `rabbitmqctl.bat`.
5656

5757
Additional tools are optional and can be obtained from GitHub:
5858

59-
* [`rabbitmqadmin`](./management-cli) for operator tasks over [HTTP API](./management)
59+
* [`rabbitmqadmin` v2](./management-cli) for operator tasks over the [HTTP API](./management#http-api)
6060
* [`rabbitmq-collect-env`](https://github.com/rabbitmq/support-tools) which collects relevant cluster and environment information
6161
as well as server logs. This tool is specific to Linux and UNIX-like operating systems.
6262

@@ -66,7 +66,7 @@ including virtual host, user and permission management, destructive operations
6666
on node's data and so on.
6767

6868
`rabbitmqadmin` is built on top of the HTTP API and uses a different mechanism, and only
69-
requires that the [HTTP API](./management) port is open for outside connections.
69+
requires that the [HTTP API](./management#http-api) port is open for outside connections.
7070

7171
Even though CLI tools ship with the server, most commands [can be used to operate on remote nodes](#remote-nodes).
7272
Plugins can [provide CLI commands](#command-discovery) that will be discovered by CLI tools for explicitly enabled plugins.
@@ -92,8 +92,8 @@ that has RabbitMQ installed.
9292
root is added to `PATH` for simpler interactive use. Non-interactive use cases can use full or relative paths without
9393
modifications to the `PATH` environment variable.
9494

95-
[`rabbitmqadmin`](./management-cli) is a standalone tool (no dependencies other than Python 3)
96-
that can be downloaded from a running node or [directly from GitHub](https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_management/bin/rabbitmqadmin).
95+
[`rabbitmqadmin`](./management-cli) is a standalone tool
96+
that is [distributed via GitHub releases](https://github.com/rabbitmq/rabbitmqadmin-ng/releases).
9797

9898
If interaction from a remote node is required, download and extract the [generic UNIX package](./install-generic-unix)
9999
or use the [Windows installer](./install-windows).
@@ -245,7 +245,7 @@ Most commands only support the online mode (when target node is running).
245245
`rabbitmq-upgrade` uses a [shared secret authentication mechanism](#erlang-cookie) (described below) with server nodes.
246246

247247

248-
### Offline Mode {#offline-mode}
248+
## Offline Mode {#offline-mode}
249249

250250
`--offline` is a flag supported by `rabbitmq-plugins` commands. When provided, the tool will avoid
251251
contacting the target node and instead operate on plugin files directly.
@@ -737,10 +737,10 @@ rabbitmqctl.bat shutdown --node [email protected]
737737
It is not a replacement for `rabbitmqctl` and provides access to a subset of most commonly
738738
performed operations provided by the [management UI](./management).
739739

740-
The tool requires Python 2.7.9 or a more recent version.
740+
`rabbitmqadmin` uses HTTP API authentication mechanism (basic HTTP authentication).
741741

742-
`rabbitmqadmin` uses HTTP API authentication mechanism (basic HTTP authentication). It has to be
743-
downloaded separately from a running node or [GitHub](https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_management/bin/rabbitmqadmin).
742+
It is a native binary and must be [downloaded separately](https://github.com/rabbitmq/rabbitmqadmin-ng/releases) from the RabbitMQ
743+
distribution.
744744

745745

746746
## "Node-local" and "Clusterwide" Commands {#cli-and-clustering}

0 commit comments

Comments
 (0)