Skip to content

Commit 6c8e3ad

Browse files
wendanilguohan
authored andcommitted
Bring queue storm status to 'pfcwd show stats' (sonic-net#500)
Signed-off-by: Wenda Ni <wenni@microsoft.com>
1 parent fbe4ede commit 6c8e3ad

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pfcwd/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
('RESTORATION TIME', 'restoration_time', 'infinite')
2828
]
2929

30-
STATS_HEADER = ('QUEUE',) + zip(*STATS_DESCRIPTION)[0]
30+
STATS_HEADER = ('QUEUE', 'STATUS',) + zip(*STATS_DESCRIPTION)[0]
3131
CONFIG_HEADER = ('PORT',) + zip(*CONFIG_DESCRIPTION)[0]
3232

3333
CONFIG_DB_PFC_WD_TABLE_NAME = 'PFC_WD'
@@ -84,7 +84,7 @@ def stats(empty, queues):
8484
line = stats.get(stat[1], '0') + '/' + stats.get(stat[2], '0')
8585
stats_list.append(line)
8686
if stats_list != ['0/0'] * len(STATS_DESCRIPTION) or empty:
87-
table.append([queue] + stats_list)
87+
table.append([queue, stats['PFC_WD_STATUS']] + stats_list)
8888

8989
click.echo(tabulate(table, STATS_HEADER, stralign='right', numalign='right', tablefmt='simple'))
9090

0 commit comments

Comments
 (0)