Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Mai Bui <maibui@microsoft.com>
  • Loading branch information
maipbui committed Mar 21, 2023
2 parents 9a857d9 + 05fa751 commit 52f6d03
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions scripts/portstat
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,17 @@ class Portstat(object):
format_number_with_comma(data.tx_ok),
format_brate(rates.tx_bps),
format_util(rates.tx_bps, port_speed),

format_number_with_comma(data.tx_err),
format_number_with_comma(data.tx_drop),
format_number_with_comma(data.tx_ovr)))

if use_json:
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
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")
if table:
if use_json:
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
if multi_asic.is_multi_asic() or device_info.is_chassis() and not use_json:
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 @@ -551,13 +552,13 @@ class Portstat(object):
format_number_with_comma(cntr.tx_err),
format_number_with_comma(cntr.tx_drop),
format_number_with_comma(cntr.tx_ovr)))

if use_json:
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
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")
if table:
if use_json:
print(table_as_json(table, header))
else:
print(tabulate(table, header, tablefmt='simple', stralign='right'))
if multi_asic.is_multi_asic() or device_info.is_chassis() and not use_json:
print("\nReminder: Please execute 'show interface counters -d all' to include internal links\n")

def main():
parser = argparse.ArgumentParser(description='Display the ports state and counters',
Expand Down

0 comments on commit 52f6d03

Please sign in to comment.