Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[portstat] portstat always returns N/A for all interfaces #8314

Closed
bingwang-ms opened this issue Aug 3, 2021 · 1 comment · Fixed by #8355
Closed

[portstat] portstat always returns N/A for all interfaces #8314

bingwang-ms opened this issue Aug 3, 2021 · 1 comment · Fixed by #8355
Labels
Triaged this issue has been triaged

Comments

@bingwang-ms
Copy link
Contributor

Description

portstat always returns N/A for all interfaces.

admin@str-msn4600c-acs-02:~$ portstat 
      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
-----------  -------  -------  --------  ---------  --------  --------  --------  -------  --------  ---------  --------  --------  --------
  Ethernet0        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
  Ethernet4        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
  Ethernet8        X      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
 Ethernet12        X      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
 Ethernet16        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
 Ethernet20        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
 Ethernet24        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
 Ethernet28        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
 Ethernet32        U      N/A       N/A        N/A       N/A       N/A       N/A      N/A       N/A        N/A       N/A       N/A       N/A
......

And all services are up and stable

admin@str-msn4600c-acs-02:~$ docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS               NAMES
f3d946283216        docker-syncd-mlnx:latest          "/usr/local/bin/supe…"   12 hours ago        Up 4 hours                              syncd
3a5f8b307b76        docker-sonic-telemetry:latest     "/usr/local/bin/supe…"   10 days ago         Up 4 hours                              telemetry
8896b4309c6b        docker-snmp:latest                "/usr/local/bin/supe…"   10 days ago         Up 4 hours                              snmp
4ec26079d553        docker-router-advertiser:latest   "/usr/bin/docker-ini…"   10 days ago         Up 4 hours                              radv
6a0c94b74961        docker-platform-monitor:latest    "/usr/bin/docker_ini…"   10 days ago         Up 4 hours                              pmon
6ca4d8ba2759        docker-lldp:latest                "/usr/bin/docker-lld…"   10 days ago         Up 4 hours                              lldp
b0745586ea83        docker-dhcp-relay:latest          "/usr/bin/docker_ini…"   10 days ago         Up 4 hours                              dhcp_relay
731db05f959c        docker-teamd:latest               "/usr/local/bin/supe…"   10 days ago         Up 4 hours                              teamd
05d4692ed040        docker-orchagent:latest           "/usr/bin/docker-ini…"   10 days ago         Up 4 hours                              swss
1a6f50f4cdd8        docker-fpm-frr:latest             "/usr/bin/docker_ini…"   10 days ago         Up 4 hours                              bgp
30b10cb9a410        docker-sonic-restapi:latest       "/usr/local/bin/supe…"   10 days ago         Up 4 hours                              restapi
7e225a2cb4dd        docker-acms:latest                "/usr/local/bin/supe…"   10 days ago         Up 4 hours                              acms
e51330ef2392        docker-database:latest            "/usr/local/bin/dock…"   10 days ago         Up 4 hours                              database

Steps to reproduce the issue:

Describe the results you received:

portstat printed N/A for all interfaces.

Describe the results you expected:

portstat should print the actual packet number.

Output of show version:

SONiC Software Version: SONiC.20201231.09
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 6bac72d7fc
Build date: Mon Jul 19 19:57:47 UTC 2021
Built by: AzDevOps@sonic-int-build-workers-000285

Platform: x86_64-mlnx_msn4600c-r0
HwSKU: ACS-MSN4600C
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2023X22076
Uptime: 05:55:27 up  4:31,  2 users,  load average: 1.49, 1.30, 1.25

Docker images:
REPOSITORY                 TAG                 IMAGE ID            SIZE
docker-syncd-mlnx          20201231.09         9cc25ff04167        951MB
docker-syncd-mlnx          latest              9cc25ff04167        951MB
docker-teamd               20201231.09         88a8f8ccd18b        411MB
docker-teamd               latest              88a8f8ccd18b        411MB
docker-orchagent           20201231.09         66c5cc786683        430MB
docker-orchagent           latest              66c5cc786683        430MB
docker-fpm-frr             20201231.09         e7cc591af0f3        430MB
docker-fpm-frr             latest              e7cc591af0f3        430MB
docker-sonic-telemetry     20201231.09         a7659e965049        491MB
docker-sonic-telemetry     latest              a7659e965049        491MB
docker-platform-monitor    20201231.09         12454eaf76b1        721MB
docker-platform-monitor    latest              12454eaf76b1        721MB
docker-snmp                20201231.09         934f8fee7acd        442MB
docker-snmp                latest              934f8fee7acd        442MB
docker-router-advertiser   20201231.09         777e1fc715c6        401MB
docker-router-advertiser   latest              777e1fc715c6        401MB
docker-lldp                20201231.09         24758bdcd6f0        441MB
docker-lldp                latest              24758bdcd6f0        441MB
docker-dhcp-relay          20201231.09         6abb8cfa7db6        408MB
docker-dhcp-relay          latest              6abb8cfa7db6        408MB
docker-database            20201231.09         6c11d73e4039        401MB
docker-database            latest              6c11d73e4039        401MB
docker-mux                 20201231.09         9a201dfbfcf7        453MB
docker-mux                 latest              9a201dfbfcf7        453MB
docker-sonic-restapi       20201231.09         22638d24e626        352MB
docker-sonic-restapi       latest              22638d24e626        352MB
docker-acms                20201231.09         39f0fe5e96b2        197MB
docker-acms                latest              39f0fe5e96b2        197MB
k8s.gcr.io/pause           3.2                 80d28bedfe5d        683kB

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@bingwang-ms
Copy link
Contributor Author

bingwang-ms commented Aug 3, 2021

The issue is because oid defined in COUNTERS_PORT_NAME_MAP is not same with that referenced in counter_db. But the reason for the gap is not clear yet.

oid defined in COUNTERS_PORT_NAME_MAP

admin@str-msn4600c-acs-02:~$ redis-cli -n 2 hgetall "COUNTERS_PORT_NAME_MAP"
  1) "Ethernet0"
  2) "oid:0x100000000093e"
  3) "Ethernet4"
  4) "oid:0x100000000095f"
  5) "Ethernet8"
  6) "oid:0x1000000000980"
  7) "Ethernet12"
  8) "oid:0x10000000009a1"
  9) "Ethernet16"
 10) "oid:0x10000000008ba"
 11) "Ethernet20"
 12) "oid:0x10000000008db"
 13) "Ethernet24"
 14) "oid:0x10000000008fc"
 15) "Ethernet28"
 16) "oid:0x100000000091d"
 17) "Ethernet32"
 18) "oid:0x1000000000a46"
 19) "Ethernet36"
......

oid referenced in counter_db

72) "COUNTERS:oid:0x15000000000a6e"
 73) "COUNTERS:oid:0x15000000000a8e"
 74) "COUNTERS:oid:0x15000000000714"
 75) "COUNTERS:oid:0x15000000000aaf"
 76) "COUNTERS:oid:0x15000000000a0a"
 77) "COUNTERS:oid:0x150000000009e9"
 78) "COUNTERS:oid:0x15000000000965"
 79) "COUNTERS:oid:0x150000000006b1"
 80) "COUNTERS:oid:0x15000000000776"
 81) "COUNTERS:oid:0x1500000000083c"
 82) "COUNTERS:oid:0x15000000000923"
 83) "COUNTERS:oid:0x1500000000085e"
 84) "COUNTERS:oid:0x150000000006b0"
 85) "COUNTERS:oid:0x150000000004e3"
 86) "COUNTERS:oid:0x15000000000777"
 87) "COUNTERS:oid:0x15000000000a4c"
 88) "COUNTERS:oid:0x15000000000378"
 89) "COUNTERS:oid:0x150000000002d3"
 90) "COUNTERS:oid:0x1500000000068f"
 91) "COUNTERS:oid:0x150000000007b8"
 92) "COUNTERS:oid:0x15000000000a4d"
 93) "COUNTERS:oid:0x1500000000081b"
 94) "COUNTERS:oid:0x15000000000756"

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Aug 4, 2021
@yxieca yxieca linked a pull request Aug 6, 2021 that will close this issue
@lguohan lguohan closed this as completed Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants