diff options
author | imarom <imarom@cisco.com> | 2017-01-23 14:06:52 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2017-01-23 14:07:49 +0200 |
commit | aee39c9dd61944b3be3c20b4e3f9ec4d57602d01 (patch) | |
tree | 46727bcb8dbc26ac64b80cee1ad7c07159890055 /scripts/trex_show_threads.py | |
parent | 193013a82048fe62319208e26fbaa4fb101a431c (diff) |
enable TRex to run with --rt : real time priority for DP and RX cores
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/trex_show_threads.py')
-rwxr-xr-x | scripts/trex_show_threads.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/trex_show_threads.py b/scripts/trex_show_threads.py index 1824d073..d0e34fe9 100755 --- a/scripts/trex_show_threads.py +++ b/scripts/trex_show_threads.py @@ -17,7 +17,8 @@ def read_task_stats (task_path): stat_data = open(stat, 'r').readline().split() stats_dict['last_sched_cpu'] = stat_data[-14] - + stats_dict['priority'] = stat_data[17] if stat_data[43] == '0' else 'RT' + return stats_dict @@ -26,7 +27,7 @@ def show_threads (pid): task_paths = ["{0}/{1}".format(process_dir, task) for task in os.listdir(process_dir)] - header = [ 'Task Name', 'PID', 'Allowed CPU', 'Last Sched CPU', 'Asked Ctx Switch', 'Forced Ctx Switch'] + header = [ 'Task Name', 'PID', 'Priority', 'Allowed CPU', 'Last Sched CPU', 'Asked Ctx Switch', 'Forced Ctx Switch'] for x in header: print('{:^20}'.format(x)), print("") @@ -41,6 +42,7 @@ def show_threads (pid): # name print("{:<20}".format(task['name'])), print("{:^20}".format(task['pid'])), + print("{:^20}".format(task['priority'])), print("{:^20}".format(task['cpus_allowed_list'])), print("{:^20}".format(task['last_sched_cpu'])), print("{:^20}".format(task['voluntary_ctxt_switches'])), |