Merge amd-dev into amd-master 20240702

Signed-off-by: Zhang Ava <niandong.zhang@amd.com>
Change-Id: I88fa6d3d7e83ffd54d99f1e3abf21cacd394994b


[ROCm/amdsmi commit: 4f160a5c6f]
This commit is contained in:
Zhang Ava
2024-07-04 14:41:35 +08:00
5 zmienionych plików z 13 dodań i 9 usunięć
+2
Wyświetl plik
@@ -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.
+4 -3
Wyświetl plik
@@ -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).
@@ -182,7 +182,7 @@ class AmdSmiMissingParameterValueException(AmdSmiException):
self.stdout_message = f"{common_message} Error code: {self.value}"
class AmdSmiNotSupportedCommandException(AmdSmiException):
class AmdSmiCommandNotSupportedException(AmdSmiException):
def __init__(self, command, outputformat: str):
super().__init__()
self.value = -7
@@ -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)
@@ -1243,7 +1243,7 @@ class AMDSMIParser(argparse.ArgumentParser):
message = message.split("'")[0]
# Check if the command is possible in other system configurations and error accordingly
if message in self.possible_commands:
raise amdsmi_cli_exceptions.AmdSmiNotSupportedCommandException(message, outputformat)
raise amdsmi_cli_exceptions.AmdSmiCommandNotSupportedException(message, outputformat)
raise amdsmi_cli_exceptions.AmdSmiInvalidCommandException(message, outputformat)
elif "unrecognized arguments: " in message:
l = len("unrecognized arguments: ")
@@ -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).