From 84626352704b6959867fd092c197d4411caac829 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Thu, 20 Jun 2024 13:05:51 -0500 Subject: [PATCH] Added dmon alias for 'amd-smi monitor' Signed-off-by: Maisam Arif Change-Id: I4a787034bd7ab1a0d08d8cfdd038add5c35cdea4 [ROCm/amdsmi commit: 6e5c4b422a319788ad5b1704e8c72f1c419faa34] --- projects/amdsmi/CHANGELOG.md | 2 ++ projects/amdsmi/amdsmi_cli/README.md | 7 ++++--- projects/amdsmi/amdsmi_cli/amdsmi_parser.py | 6 +++--- projects/amdsmi/docs/how-to/using-AMD-SMI-CLI-tool.md | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/projects/amdsmi/CHANGELOG.md b/projects/amdsmi/CHANGELOG.md index 1a92e9a48d..11ca692f3a 100644 --- a/projects/amdsmi/CHANGELOG.md +++ b/projects/amdsmi/CHANGELOG.md @@ -8,6 +8,8 @@ Full documentation for amd_smi_lib is available at [https://rocm.docs.amd.com/pr ### Additions +- **`amd-smi dmon` is now available as an alias to `amd-smi monitor`**. + - **Added optional process table under `amd-smi monitor -q`**. The monitor subcommand within the CLI Tool now has the `-q` option to enable an optional process table underneath the original monitored output. diff --git a/projects/amdsmi/amdsmi_cli/README.md b/projects/amdsmi/amdsmi_cli/README.md index f0dc69c380..b48a58832f 100644 --- a/projects/amdsmi/amdsmi_cli/README.md +++ b/projects/amdsmi/amdsmi_cli/README.md @@ -73,7 +73,7 @@ Type "help", "copyright", "credits" or "license" for more information. ## Usage -amd-smi will report the version and current platform detected when running the command without arguments: +AMD-SMI reports the version and current platform detected when running the command line interface (CLI) without arguments: ``` bash ~$ amd-smi @@ -97,7 +97,7 @@ AMD-SMI Commands: topology Displays topology information of the devices set Set options for devices reset Reset options for devices - monitor Monitor metrics for target devices + monitor (dmon) Monitor metrics for target devices xgmi Displays xgmi information of the devices ``` @@ -594,7 +594,7 @@ Command Modifiers: usage: amd-smi monitor [-h] [--json | --csv] [--file FILE] [--loglevel LEVEL] [-g GPU [GPU ...] | -U CPU [CPU ...] | -O CORE [CORE ...]] [-w INTERVAL] [-W TIME] [-i ITERATIONS] [-p] [-t] [-u] [-m] [-n] - [-d] [-e] [-v] [-r] + [-d] [-e] [-v] [-r] [-q] Monitor a target device for the specified arguments. If no arguments are provided, all arguments will be enabled. @@ -629,6 +629,7 @@ Monitor Arguments: -e, --ecc Monitor ECC single bit, ECC double bit, and PCIe replay error counts -v, --vram-usage Monitor memory usage in MB -r, --pcie Monitor PCIe bandwidth in Mb/s + -q, --process Enable Process information table below monitor output Command Modifiers: --json Displays output in JSON format (human readable by default). diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py index 359d51fc16..4d2984d620 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_parser.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_parser.py @@ -111,10 +111,10 @@ class AMDSMIParser(argparse.ArgumentParser): help="Descriptions:", metavar='') - # Store possible subcommands for later errors + # Store possible subcommands & aliases for later errors self.possible_commands = ['version', 'list', 'static', 'firmware', 'ucode', 'bad-pages', 'metric', 'process', 'profile', 'event', 'topology', 'set', - 'reset', 'monitor', 'xgmi'] + 'reset', 'monitor', 'dmon', 'xgmi'] # Add all subparsers self._add_version_parser(self.subparsers, version) @@ -1138,7 +1138,7 @@ class AMDSMIParser(argparse.ArgumentParser): process_help = "Enable Process information table below monitor output" # Create monitor subparser - monitor_parser = subparsers.add_parser('monitor', help=monitor_help, description=monitor_subcommand_help) + monitor_parser = subparsers.add_parser('monitor', help=monitor_help, description=monitor_subcommand_help, aliases=["dmon"]) monitor_parser._optionals.title = monitor_optionals_title monitor_parser.formatter_class=lambda prog: AMDSMISubparserHelpFormatter(prog) monitor_parser.set_defaults(func=func) diff --git a/projects/amdsmi/docs/how-to/using-AMD-SMI-CLI-tool.md b/projects/amdsmi/docs/how-to/using-AMD-SMI-CLI-tool.md index 6c22596f21..60d04498b4 100644 --- a/projects/amdsmi/docs/how-to/using-AMD-SMI-CLI-tool.md +++ b/projects/amdsmi/docs/how-to/using-AMD-SMI-CLI-tool.md @@ -521,7 +521,7 @@ Command Modifiers: usage: amd-smi monitor [-h] [--json | --csv] [--file FILE] [--loglevel LEVEL] [-g GPU [GPU ...] | -U CPU [CPU ...] | -O CORE [CORE ...]] [-w INTERVAL] [-W TIME] [-i ITERATIONS] [-p] [-t] [-u] [-m] [-n] - [-d] [-e] [-v] [-r] + [-d] [-e] [-v] [-r] [-q] Monitor a target device for the specified arguments. If no arguments are provided, all arguments will be enabled. @@ -556,6 +556,7 @@ Monitor Arguments: -e, --ecc Monitor ECC single bit, ECC double bit, and PCIe replay error counts -v, --vram-usage Monitor memory usage in MB -r, --pcie Monitor PCIe bandwidth in Mb/s + -q, --process Enable Process information table below monitor output Command Modifiers: --json Displays output in JSON format (human readable by default).