From ce230efaaafd8ce37ec6e1be618757af729ccb75 Mon Sep 17 00:00:00 2001 From: "Kanangot Balakrishnan, Bindhiya" Date: Mon, 7 Jul 2025 11:26:10 -0500 Subject: [PATCH] [SWDEV-537852] Update process name help text (#517) * [SWDEV-537852] Update process name help text Currently process name displays N/A if that need elevated permissions. Updated the default amd-smi, process and monitor commands help texts to display elevated permission requirement. --------- Signed-off-by: Bindhiya Kanangot Balakrishnan Signed-off-by: Maisam Arif Co-authored-by: Maisam Arif --- amdsmi_cli/amdsmi_logger.py | 7 ++++++- amdsmi_cli/amdsmi_parser.py | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/amdsmi_cli/amdsmi_logger.py b/amdsmi_cli/amdsmi_logger.py index b8e634a5ad..df49e31f69 100644 --- a/amdsmi_cli/amdsmi_logger.py +++ b/amdsmi_cli/amdsmi_logger.py @@ -1074,6 +1074,7 @@ class AMDSMILogger(): print("| Processes: |") print("| GPU PID Process Name GTT_MEM VRAM_MEM MEM_USAGE CU % |") print(default_line_5) + elevated_permission_error = False if len(output['processes']) != 0: for process in output['processes']: gpu_id = str(process['gpu']).rjust(4) @@ -1088,6 +1089,10 @@ class AMDSMILogger(): cu_occupancy = "N/A" print("| {0:4.4s} {1:9.9s} {2:19.19s} {3:8.8s} {4:8.8s} {5:9.9s} {6:7.7s} |".format( gpu_id, pid, process_name, gtt_mem, vram_mem, mem_usage, cu_occupancy)) + if process['name'] == "N/A": + elevated_permission_error = True else: print("| No running processes found |") - print(default_line_1) \ No newline at end of file + print(default_line_1) + if elevated_permission_error: + print("Process Name may require elevated permissions.") diff --git a/amdsmi_cli/amdsmi_parser.py b/amdsmi_cli/amdsmi_parser.py index c451bb7f79..b2b0e178a0 100644 --- a/amdsmi_cli/amdsmi_parser.py +++ b/amdsmi_cli/amdsmi_parser.py @@ -1065,7 +1065,8 @@ class AMDSMIParser(argparse.ArgumentParser): engine_help = "All engine usages" pid_help = "Gets all process information about the specified process based on Process ID" name_help = "Gets all process information about the specified process based on Process Name.\ - \nIf multiple processes have the same name, information is returned for all of them." + \nIf multiple processes have the same name, information is returned for all of them.\ + \nProcess Name may require elevated permissions." # Create process subparser @@ -1356,7 +1357,7 @@ class AMDSMIParser(argparse.ArgumentParser): ecc_help = "Monitor ECC single bit, ECC double bit, and PCIe replay error counts" mem_usage_help = "Monitor memory usage in MB" pcie_bandwidth_help = "Monitor PCIe bandwidth in Mb/s" - process_help = "Enable Process information table below monitor output" + process_help = "Enable Process information table below monitor output;\n Process Name may require elevated permissions" violation_help = "Monitor power and thermal violation status (%%);\n Only available for MI300 or newer ASICs" # Create monitor subparser