Skip to content

[show]: Add 'show interfaces alias' command to display port name/alias mapping#107

Merged
lguohan merged 1 commit intosonic-net:masterfrom
jleveque:show_alias
Sep 27, 2017
Merged

[show]: Add 'show interfaces alias' command to display port name/alias mapping#107
lguohan merged 1 commit intosonic-net:masterfrom
jleveque:show_alias

Conversation

@jleveque
Copy link
Copy Markdown
Contributor

@jleveque jleveque commented Sep 26, 2017

Sample output:

admin@sonic:~$ show interfaces alias
Name         Alias
-----------  --------------
Ethernet0    fortyGigE0/0
Ethernet4    fortyGigE0/4
Ethernet8    fortyGigE0/8
Ethernet12   fortyGigE0/12
Ethernet16   fortyGigE0/16
Ethernet20   fortyGigE0/20
Ethernet24   fortyGigE0/24
Ethernet28   fortyGigE0/28
Ethernet32   fortyGigE0/32
Ethernet36   fortyGigE0/36
Ethernet40   fortyGigE0/40
Ethernet44   fortyGigE0/44
Ethernet48   fortyGigE0/48
Ethernet52   fortyGigE0/52
Ethernet56   fortyGigE0/56
Ethernet60   fortyGigE0/60
Ethernet64   fortyGigE0/64
Ethernet68   fortyGigE0/68
Ethernet72   fortyGigE0/72
Ethernet76   fortyGigE0/76
Ethernet80   fortyGigE0/80
Ethernet84   fortyGigE0/84
Ethernet88   fortyGigE0/88
Ethernet92   fortyGigE0/92
Ethernet96   fortyGigE0/96
Ethernet100  fortyGigE0/100
Ethernet104  fortyGigE0/104
Ethernet108  fortyGigE0/108
Ethernet112  fortyGigE0/112
Ethernet116  fortyGigE0/116
Ethernet120  fortyGigE0/120
Ethernet124  fortyGigE0/124
admin@sonic:~$ show interfaces alias Ethernet44
Name        Alias
----------  -------------
Ethernet44  fortyGigE0/44

Copy link
Copy Markdown
Contributor

@nikos-github nikos-github left a comment

Choose a reason for hiding this comment

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

Please add appropriate output from your testing and to show how the cmd output looks like.

@jleveque
Copy link
Copy Markdown
Contributor Author

@Nikos-Li: Sample output added to PR description.

@lguohan lguohan merged commit 70422b5 into sonic-net:master Sep 27, 2017
@jleveque jleveque deleted the show_alias branch September 27, 2017 16:31
@nikos-github
Copy link
Copy Markdown
Contributor

show interface portmap does the same thing. Why do we need yet another command?

@jleveque
Copy link
Copy Markdown
Contributor Author

@Nikos-Li: SONiC does not have a show interface portmap command. What are you referring to?

@nikos-github
Copy link
Copy Markdown
Contributor

@jleveque It is up for review, isn't it? #98

@jleveque
Copy link
Copy Markdown
Contributor Author

@Nikos-Li: That PR is held up due to the debate over the Clear command. Also, this solution is cleaner as it doesn't require the writing of template files. If you prefer the command name portmap over alias, please open a new issue and we can discuss it there.

@nikos-github
Copy link
Copy Markdown
Contributor

@jleveque You could have suggested those changes in show interface portmap if you thought it was a better solution. Merging code that hasn't been cleared from all reviewers, is not acceptable. Especially when a solution for the same issue is in review.

zhenggen-xu pushed a commit to zhenggen-xu/sonic-utilities that referenced this pull request Jun 6, 2018
* msft_github/master:
  Enhancement of 'show' commands and addition of 'debug', and 'undebug'… (sonic-net#113)
  CLI support for Layer 2 MAC/FDB show  (sonic-net#106)
  [show]: Add 'show interfaces alias' command to display port name/alias mapping (sonic-net#107)
  Add 'ipv6' group along with 'bgp' and 'route' subcommands; Remove duplicate commands ('bgp,' 'route') from under root group (sonic-net#102)
  [generate_dump]: Skip the sparse file /var/log/lastlog (sonic-net#104)
  Added syncd SAI dump to sysdump script (sonic-net#89)
  Adapt to new minigraph_parser schema (sonic-net#103)
  [core dump] remove number of parameter assumption from script coredump-compress
  [FastReboot]: Update FR to make it working with 1.0.3 (sonic-net#95)
vdahiya12 pushed a commit to vdahiya12/sonic-utilities that referenced this pull request Jul 23, 2021
…d on Python version (sonic-net#107)

Add dependence on 'enum' package back to xcvrd (basically reverting most of sonic-net/sonic-platform-daemons#106). However, in setup.py, we only install the enum34 package if the version of Python we are installing for is < 3.4. Thus, when installing the Python 3 xcvrd package in Python 2.7, the Python 2 version of enum34 will be installed. However, if installing the Python 3 xcvrd package on Python 3.7, enum34 will not be installed, causing xcrvd to import the 'enum' module from the standard library. This should prevent any conflicts which arise when 'enum34' is ever installed on Python versions >= 3.4 by preventing this situation.
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 18, 2022
9688ef4 Add missing functions to be on par with swsscommon. (sonic-net#107)

Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
cyw233 pushed a commit to cyw233/sonic-utilities that referenced this pull request Mar 2, 2026
)

Signed-off-by: Anand Mehra anamehra@cisco.com

<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 failure_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "closes #xxxx",
 "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
 issue when the PR is merged.

 If you are adding/modifying/removing any command or utility script, please also
 make sure to add/modify/remove any unit tests from the tests
 directory as appropriate.

 If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
 subcommand, or you are adding a new subcommand, please make sure you also
 update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
 your changes.

 Please provide the following information:
-->

#### What I did
On Chassis-packet supervisor, show interface counter -d all returns no data

#### How I did it
Fixed the condition in portstat.py to use right path for Chassis Packet RP to collect counters.
Added condition to collect link state information.

#### How to verify it
Run 'show interface counters -d all' on Chassis-Packet Supervisor

#### Previous command output (if the output of a command-line utility has changed)

```
root@aaa14-rp:/home/cisco# show interface counters -d all

Reminder: Please execute 'show interface counters -d all' to include internal links
```
#### New command output (if the output of a command-line utility has changed)
```
root@aaa14-rp:/home/cisco# show int co -d all
 IFACE STATE RX_OK RX_BPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS TX_UTIL TX_ERR TX_DRP TX_OVR
--------------- ------- ----------- ------------ --------- -------- -------- -------- ----------- ------------ --------- -------- -------- --------
 Ethernet-BP0 0 0.00 B/s 0.00% 0 0 0 0 0.00 B/s 0.00% 0 0 0
.
.
.
Ethernet-BP4592 0 0.00 B/s 0.00% 0 0 0 0 0.00 B/s 0.00% 0 0 0
Ethernet-BP4596 0 0.00 B/s 0.00% 0 0 0 0 0.00 B/s 0.00% 0 0 0

Reminder: Please execute 'show interface counters -d all' to include internal links

root@aaa14-rp:/home/cisco# show interfaces counters -n asic0 -d all
 IFACE STATE RX_OK RX_BPS RX_UTIL RX_ERR RX_DRP RX_OVR TX_OK TX_BPS TX_UTIL TX_ERR TX_DRP TX_OVR
-------------- ------- ----------- ------------ --------- -------- -------- -------- ----------- ------------ --------- -------- -------- --------
 Ethernet-BP0 0 0.00 B/s 0.00% 0 0 0 0 0.00 B/s 0.00% 0 0 0
 Ethernet-BP4 0 0.00 B/s 0.00% 0 0 0 0 0.00 B/s 0.00% 0 0 0
 Ethernet-BP8 0 0.00 B/s 0.00% 0 0 0 0 0.00 B/s 0.00% 0 0 0
.
.
.
Ethernet-BP244 106,613,381 1511.24 KB/s 0.01% 0 950 0 141,593,632 1255.56 KB/s 0.01% 0 0 0

Reminder: Please execute 'show interface counters -d all' to include internal links

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants