[SWDEV-539721] Show complete process name (#536)

Modified the file used to fetch process name so that complete name with path can be displayed.

Changes:
amd-smi monitor -q
- human readable format will output only the process name
- csv and json formats will print the full path

amd-smi process
- name will always be the full path to the process

amd-smi (default output)
- name will always be truncated.

---------

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Tá an tiomantas seo le fáil i:
Kanangot Balakrishnan, Bindhiya
2025-07-09 16:34:39 -05:00
tiomanta ag GitHub
tuismitheoir 01a6158c85
tiomantas 514517e536
D'athraigh 2 comhad le 6 breiseanna agus 7 scriosta
+2 -2
Féach ar an gComhad
@@ -228,7 +228,7 @@ class AMDSMILogger():
string_process_value = str(process_value)
if process_key == "name":
# Truncate name if too long
process_name = string_process_value[:17]
process_name = string_process_value.split('/')[-1][:17]
if process_name == "":
process_name = "N/A"
table_values += process_name.rjust(17)
@@ -1079,7 +1079,7 @@ class AMDSMILogger():
for process in output['processes']:
gpu_id = str(process['gpu']).rjust(4)
pid = str(process['pid']).rjust(9)
process_name = str(process['name']).ljust(19)
process_name = str(process['name']).split('/')[-1].ljust(19)
gtt_mem = str(process['gtt']).rjust(8)
vram_mem = str(process['vram']).rjust(8)
mem_usage = str(process['mem_usage']).rjust(9)