Skip to content

Commit

Permalink
add print for chassis
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyiz2021 committed Feb 13, 2023
1 parent 4f4c610 commit cc6f5a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/portstat
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ from collections import OrderedDict, namedtuple
from natsort import natsorted
from tabulate import tabulate
from sonic_py_common import multi_asic
from sonic_py_common import device_info

# mock the redis for unit test purposes #
try:
Expand Down Expand Up @@ -337,7 +338,7 @@ class Portstat(object):
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
if multi_asic.is_multi_asic():
if multi_asic.is_multi_asic() or device_info.is_chassis():
print("\nReminder: Please execute 'show interface counters -d all' to include internal links\n")

def cnstat_intf_diff_print(self, cnstat_new_dict, cnstat_old_dict, intf_list):
Expand Down Expand Up @@ -555,7 +556,7 @@ class Portstat(object):
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
if multi_asic.is_multi_asic():
if multi_asic.is_multi_asic() or device_info.is_chassis():
print("\nReminder: Please execute 'show interface counters -d all' to include internal links\n")

def main():
Expand Down

1 comment on commit cc6f5a6

@kartik-arista
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest change looks ok to me, Thanks @wenyiz2021

Please sign in to comment.