Skip to content

Commit

Permalink
Bring queue storm status to 'pfcwd show stats' (sonic-net#500)
Browse files Browse the repository at this point in the history
Signed-off-by: Wenda Ni <wenni@microsoft.com>
  • Loading branch information
wendani authored and lguohan committed Apr 25, 2019
1 parent fbe4ede commit 6c8e3ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pfcwd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
('RESTORATION TIME', 'restoration_time', 'infinite')
]

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

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

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

Expand Down

0 comments on commit 6c8e3ad

Please sign in to comment.