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 fails #482

Closed
marian-pritsak opened this issue Apr 6, 2017 · 5 comments
Closed

portstat fails #482

marian-pritsak opened this issue Apr 6, 2017 · 5 comments

Comments

@marian-pritsak
Copy link
Collaborator

# portstat 
Traceback (most recent call last):
  File "/usr/bin/portstat", line 320, in <module>
    main()
  File "/usr/bin/portstat", line 273, in main
    cnstat_dict = portstat.get_cnstat()
  File "/usr/bin/portstat", line 77, in get_cnstat
    cnstat_dict[port] = get_counters(counter_port_name_map[port])
  File "/usr/bin/portstat", line 67, in get_counters
    fields[pos] += int(self.db.get(self.db.COUNTERS_DB, full_table_id, counter_name))
TypeError: int() argument must be a string or a number, not 'NoneType'

Reproduced on Mellanox platform.
Can anyone try it on another to help locate the problem?

@NStetskovych-zz
Copy link
Contributor

AS7512:

admin@sonic:~$ sudo portstat
Traceback (most recent call last):
  File "/usr/bin/portstat", line 320, in <module>
    main()
  File "/usr/bin/portstat", line 273, in main
    cnstat_dict = portstat.get_cnstat()
  File "/usr/bin/portstat", line 77, in get_cnstat
    cnstat_dict[port] = get_counters(counter_port_name_map[port])
  File "/usr/bin/portstat", line 67, in get_counters
    fields[pos] += int(self.db.get(self.db.COUNTERS_DB, full_table_id, counter_name))
TypeError: int() argument must be a string or a number, not 'NoneType'

@sihuihan88
Copy link
Contributor

sihuihan88 commented Apr 6, 2017

The reason is that there is no SAI_PORT_STAT_ETHER_RX_OVERSIZE_PKTS/ SAI_PORT_STAT_ETHER_TX_OVERSIZE_PKTS counter info in the database which are used to calculate RX_OVR and TX_OVR.
Can you check why there is no such info in your platform?
At the same time, I will set the status to NA if no counter exists.

@sihuihan88
Copy link
Contributor

sonic-net/sonic-utilities#29 resolves this issue

@stcheng stcheng closed this as completed Apr 11, 2017
@stcheng
Copy link
Contributor

stcheng commented Apr 11, 2017

@marian-pritsak please verify

@marian-pritsak
Copy link
Collaborator Author

Works, thanks

stcheng pushed a commit to stcheng/sonic-buildimage that referenced this issue Jul 19, 2019
swss:
[vxlanorch]: Allow ipv6 src ip for Vxlan tunnel creation (sonic-net#896)
[aclorch]: Allow DTEL drop actions in DTEL flow watchlist (sonic-net#915)
Fix typo in orchagent_restart_check from fasle to false. (sonic-net#923)
[sonic-swss]: Fix for FPM accept call failure in ARM arch (sonic-net#925)
Add retryCount option for orchagent_restart_check program. (sonic-net#833)
[vlan] Add pytest cases to validate nonexistent vlan behavior. (sonic-net#874)
[intfsorch] Wait for interface prior to prefix (sonic-net#796)
Set timer only when interval changes. Not in each firing of the timer. (sonic-net#945)
[test]: Fix set interface in configuration database (sonic-net#956)
[copporch]: Fix polymorphic type error (sonic-net#946)
[AclOrch]: Fix the acl mirror counter doubled by inactive mirror and active again (sonic-net#952)
[MirrorOrch]: Init the next hop ip with 0 instead of default constructor (sonic-net#953)
[portsorch]: Add reference count of port (sonic-net#962)
[mock_test]: Move mock tests into a separate folder to separate them from vs tests (sonic-net#950)
remove crm acl_counters when acl_table removed (sonic-net#918)
[aclorch]: Fix matching MIRROR_DSCP throws unnecessary errors (sonic-net#966)
[policerorch]: Fix return code comparison error (sonic-net#968)
[gitignore]: Add swss-dbg related files (sonic-net#967)
[vxlanmgrd]: Fix for vxlanmgrd cannot correctly work after config reload (sonic-net#934)
[vxlanorch]: Add extra info into NOTICE logs (sonic-net#891)
[test]: Add a neighbor entry with BCAST MAC and verify its ignored (sonic-net#955)
[copporch]: Fix copporch in DEL command (sonic-net#972)
[orchagent]: Fix crash during orchagent process exit (sonic-net#974)
[vnetorch]: Fix VNET orchagents order for warm-reboot flow (sonic-net#958)
[test]: Skip unstable test test_vnet_orch_1 (sonic-net#976)
[intfsorch]: Fix rif flex counter removal error (sonic-net#975)
Update tests README.md file
[aclorch]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (sonic-net#978)
[test]: Skip test_watermark.py::TestWatermark::test_lua_plugins (sonic-net#981)
[teamsyncd]: Add information for LAG membership changes (sonic-net#982)

common:
Add an assert to logger, which will log a message and abort. (sonic-net#286)
[test]: Add IpAddress::isZero() unit test (sonic-net#289)
do not abort when read timerfd return 0 and errno = 0 (sonic-net#291)
Add BGP_STATE_TABLE in stateDB (sonic-net#273)
[IpAddress]: add mcast scope on address and isFullMask method on prefix (sonic-net#285)
Add ignore Wshadow pragma to json.hpp (sonic-net#292)
[executor]: Fix Executor does not get correct priority saved in m_selectable (sonic-net#290)
[schema]: Remove duplicate STATE_MIRROR_SESSION_TABLE_NAME (sonic-net#294)
timerfd:read failure - Record in logs as error. (sonic-net#295)
[schema]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (sonic-net#296)
[schema]: Add PASS_THROUGH_ROUTE_TABLE to config and application db (sonic-net#297)

sairedis:
ARM32 bit fixes, for 64bit printf format specifier (sonic-net#468)
Reduce the timeout (GET_RESPONSE_TIMEOUT) from 6 minutes to 1 minute. (sonic-net#472)
Fixed config_syncd_barefoot function (sonic-net#474)
[syncd_init_common.sh] fix fast reboot backwards compatibility (sonic-net#480)
Add default bridge id for bridge port id of type PORT in virtual switch (sonic-net#473)
Fix a bug in parsing kernel argument of fast-reboot (sonic-net#482)
Add TimerWatchdog for monitoring long execution apis (sonic-net#469)
Add specific comparison logic for tunnel map (sonic-net#475)
[vslib] add ACL action capabilities support (sonic-net#481)
Per buffer pool watermark polling mode (sonic-net#485)
Add specific comparison logic for ACL counter (sonic-net#484)
Process flex counters requests in separate thread (sonic-net#483)
Make sairedis/syncd synchronous (sonic-net#476)
Fixed conditional operator. (sonic-net#487)

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
lguohan pushed a commit that referenced this issue Jul 20, 2019
swss:
[vxlanorch]: Allow ipv6 src ip for Vxlan tunnel creation (#896)
[aclorch]: Allow DTEL drop actions in DTEL flow watchlist (#915)
Fix typo in orchagent_restart_check from fasle to false. (#923)
[sonic-swss]: Fix for FPM accept call failure in ARM arch (#925)
Add retryCount option for orchagent_restart_check program. (#833)
[vlan] Add pytest cases to validate nonexistent vlan behavior. (#874)
[intfsorch] Wait for interface prior to prefix (#796)
Set timer only when interval changes. Not in each firing of the timer. (#945)
[test]: Fix set interface in configuration database (#956)
[copporch]: Fix polymorphic type error (#946)
[AclOrch]: Fix the acl mirror counter doubled by inactive mirror and active again (#952)
[MirrorOrch]: Init the next hop ip with 0 instead of default constructor (#953)
[portsorch]: Add reference count of port (#962)
[mock_test]: Move mock tests into a separate folder to separate them from vs tests (#950)
remove crm acl_counters when acl_table removed (#918)
[aclorch]: Fix matching MIRROR_DSCP throws unnecessary errors (#966)
[policerorch]: Fix return code comparison error (#968)
[gitignore]: Add swss-dbg related files (#967)
[vxlanmgrd]: Fix for vxlanmgrd cannot correctly work after config reload (#934)
[vxlanorch]: Add extra info into NOTICE logs (#891)
[test]: Add a neighbor entry with BCAST MAC and verify its ignored (#955)
[copporch]: Fix copporch in DEL command (#972)
[orchagent]: Fix crash during orchagent process exit (#974)
[vnetorch]: Fix VNET orchagents order for warm-reboot flow (#958)
[test]: Skip unstable test test_vnet_orch_1 (#976)
[intfsorch]: Fix rif flex counter removal error (#975)
Update tests README.md file
[aclorch]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (#978)
[test]: Skip test_watermark.py::TestWatermark::test_lua_plugins (#981)
[teamsyncd]: Add information for LAG membership changes (#982)

common:
Add an assert to logger, which will log a message and abort. (#286)
[test]: Add IpAddress::isZero() unit test (#289)
do not abort when read timerfd return 0 and errno = 0 (#291)
Add BGP_STATE_TABLE in stateDB (#273)
[IpAddress]: add mcast scope on address and isFullMask method on prefix (#285)
Add ignore Wshadow pragma to json.hpp (#292)
[executor]: Fix Executor does not get correct priority saved in m_selectable (#290)
[schema]: Remove duplicate STATE_MIRROR_SESSION_TABLE_NAME (#294)
timerfd:read failure - Record in logs as error. (#295)
[schema]: Change CFG_ACL_TABLE_NAME to CFG_ACL_TABLE_TABLE_NAME (#296)
[schema]: Add PASS_THROUGH_ROUTE_TABLE to config and application db (#297)

sairedis:
ARM32 bit fixes, for 64bit printf format specifier (#468)
Reduce the timeout (GET_RESPONSE_TIMEOUT) from 6 minutes to 1 minute. (#472)
Fixed config_syncd_barefoot function (#474)
[syncd_init_common.sh] fix fast reboot backwards compatibility (#480)
Add default bridge id for bridge port id of type PORT in virtual switch (#473)
Fix a bug in parsing kernel argument of fast-reboot (#482)
Add TimerWatchdog for monitoring long execution apis (#469)
Add specific comparison logic for tunnel map (#475)
[vslib] add ACL action capabilities support (#481)
Per buffer pool watermark polling mode (#485)
Add specific comparison logic for ACL counter (#484)
Process flex counters requests in separate thread (#483)
Make sairedis/syncd synchronous (#476)
Fixed conditional operator. (#487)

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
Kalimuthu-Velappan pushed a commit to Kalimuthu-Velappan/sonic-buildimage that referenced this issue Sep 12, 2019
…sonic-net#482)

* Tool to verify ASIC route entries against APPL-DB ROUTE & INTF tables

* code updated per review comments
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this issue Mar 23, 2020
…c-net#482)

* Add new test case for ACL - Rule Priority

New test case - I created 4 rules with priorities 10, 20, 30, 40, then I added a fifth rule with priority 21.  Made sure they were all programmed correctly in the DB

* new acl test case: added a rule in between configured rules

I configured five rules with priorities 10, 20, 30, 40, then configured another rule with priority 21.  Verified that all five rules were pushed to the ASICDB

* Delete test_acl.py

mistakenly added this file

* removing redundant code by inserting via a loop

* created helper function to check proper rule config
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this issue Aug 31, 2020
qiluo-msft added a commit that referenced this issue Apr 29, 2021
Includes commits
```
f3e1085 2021-04-22 | [swig] fix ConfigDBConnector.db_name (#483) [Qi Luo]
0e2f1c0 2021-04-21 | [swig] Implement SonicV2Connector.hmset() (#480) [Qi Luo]
d18ce28 2021-04-21 | [swss-common] Add MUX Metrics Table (#482) [Tamer Ahmed]
2e5a194 2021-04-20 | Support for in-band-mgmt via management VRF (#479) [Venkatesan Mahalingam]
3e5529f 2021-04-19 | [swig] Implement TableEntryPoppable.pops() (#478) [Qi Luo]
4a3903b 2021-04-19 | Support for in-band-mgmt via management VRF. (#476) [Venkatesan Mahalingam]
fc2c734 2021-04-19 | [swig] allow threads (#477) [Qi Luo]
```
daall added a commit to daall/sonic-buildimage that referenced this issue Apr 29, 2021
sonic-swss:
- [Monitor Vlan] Fix a typo in hostif (sonic-net#1722)
- Update pool sizes during initialization from timer only (sonic-net#1708)
- [SflowMgr] SamplingRate Update by Speed Change Added (sonic-net#1721)

sonic-swss-common:
- [swss-common] Add MUX Metrics Table (sonic-net#482)
- [azp] Purge swss before installing the newly built deb package (sonic-net#472)

sonic-utilities:
- disk_check: Check & mount RO as RW using tmpfs (sonic-net#1569)
- No more IP validation as it is more likely a URL (sonic-net#1555)
- Stop PMON docker before cold and soft reboots (sonic-net#1514)
- Add soft-reboot reboot type (sonic-net#1453)
- [acl] Use a list instead of a comma-separated string for ACL port list (sonic-net#1519)
- sonic-installer: fix py3 issues in bootloader.aboot (sonic-net#1553)
- Fix unsupported fs.squashfs extraction in sonic-installer (sonic-net#1366)
- [show][config] cli support for firmware upgrade on Y-Cable (sonic-net#1528) (sonic-net#1558)

sonic-linux-kernel:
- [Mellanox] backport kernel patches for hw-management 7.0100.2303 (sonic-net#211)

Signed-off-by: Danny Allen <daall@microsoft.com>
lguohan pushed a commit that referenced this issue May 4, 2021
* [202012][swss/swss-common/utilities/kernel] Update submodule

sonic-swss:
- [Monitor Vlan] Fix a typo in hostif (#1722)
- Update pool sizes during initialization from timer only (#1708)
- [SflowMgr] SamplingRate Update by Speed Change Added (#1721)

sonic-swss-common:
- [swss-common] Add MUX Metrics Table (#482)
- [azp] Purge swss before installing the newly built deb package (#472)

sonic-utilities:
- disk_check: Check & mount RO as RW using tmpfs (#1569)
- No more IP validation as it is more likely a URL (#1555)
- Stop PMON docker before cold and soft reboots (#1514)
- Add soft-reboot reboot type (#1453)
- [acl] Use a list instead of a comma-separated string for ACL port list (#1519)
- sonic-installer: fix py3 issues in bootloader.aboot (#1553)
- Fix unsupported fs.squashfs extraction in sonic-installer (#1366)
- [show][config] cli support for firmware upgrade on Y-Cable (#1528) (#1558)

sonic-linux-kernel:
- [Mellanox] backport kernel patches for hw-management 7.0100.2303 (#211)

Signed-off-by: Danny Allen <daall@microsoft.com>

* Update utilities w/ build fix
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this issue May 23, 2021
Includes commits
```
f3e1085 2021-04-22 | [swig] fix ConfigDBConnector.db_name (sonic-net#483) [Qi Luo]
0e2f1c0 2021-04-21 | [swig] Implement SonicV2Connector.hmset() (sonic-net#480) [Qi Luo]
d18ce28 2021-04-21 | [swss-common] Add MUX Metrics Table (sonic-net#482) [Tamer Ahmed]
2e5a194 2021-04-20 | Support for in-band-mgmt via management VRF (sonic-net#479) [Venkatesan Mahalingam]
3e5529f 2021-04-19 | [swig] Implement TableEntryPoppable.pops() (sonic-net#478) [Qi Luo]
4a3903b 2021-04-19 | Support for in-band-mgmt via management VRF. (sonic-net#476) [Venkatesan Mahalingam]
fc2c734 2021-04-19 | [swig] allow threads (sonic-net#477) [Qi Luo]
```
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this issue Aug 7, 2021
Includes commits
```
f3e1085 2021-04-22 | [swig] fix ConfigDBConnector.db_name (sonic-net#483) [Qi Luo]
0e2f1c0 2021-04-21 | [swig] Implement SonicV2Connector.hmset() (sonic-net#480) [Qi Luo]
d18ce28 2021-04-21 | [swss-common] Add MUX Metrics Table (sonic-net#482) [Tamer Ahmed]
2e5a194 2021-04-20 | Support for in-band-mgmt via management VRF (sonic-net#479) [Venkatesan Mahalingam]
3e5529f 2021-04-19 | [swig] Implement TableEntryPoppable.pops() (sonic-net#478) [Qi Luo]
4a3903b 2021-04-19 | Support for in-band-mgmt via management VRF. (sonic-net#476) [Venkatesan Mahalingam]
fc2c734 2021-04-19 | [swig] allow threads (sonic-net#477) [Qi Luo]
```
mssonicbld added a commit that referenced this issue May 2, 2024
…D automatically (#18826)

#### Why I did it
src/sonic-platform-daemons
```
* 9d0c550 - (HEAD -> master, origin/master, origin/HEAD) [ycabled] [active-standby] add changes for correcting telemetry values for 'active-standby' when the cable is present but vendor name and part number is not recognized (#478) (8 hours ago) [vdahiya12]
* 7e18648 - [xcvrd] Fix issue: logical_port_name is not defined (#482) (26 hours ago) [Junchao-Mellanox]
* eb91cb7 - Handling exceptions in CMIS SM to prevent xcvrd crash (#483) (26 hours ago) [mihirpat1]
* 6655396 - Adding frequency grid validation for ZR optics (#466) (2 days ago) [balram-csco]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this issue May 17, 2024
…D automatically (#18985)

#### Why I did it
src/sonic-platform-daemons
```
* 61df8be - (HEAD -> 202311, origin/202311) [xcvrd] Fix issue: logical_port_name is not defined (#482) (7 hours ago) [Junchao-Mellanox]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants