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

question about eeprom.py and sfputil.py #1461

Closed
ForzaTian opened this issue Mar 6, 2018 · 6 comments
Closed

question about eeprom.py and sfputil.py #1461

ForzaTian opened this issue Mar 6, 2018 · 6 comments

Comments

@ForzaTian
Copy link

ForzaTian commented Mar 6, 2018

Description

Can't execute eeprom.py and sfputil.py

Steps to reproduce the issue:

  1. ls eeprom.py and sfputil.py in sonic
  2. execute sonic command

Describe the results you received:

admin@sonic:$ ls /usr/share/sonic/device/x86_64-delta_dsc100-r0/plugins/
eeprom.py sfputil.py
admin@sonic:
$ sudo decode-syseeprom
/usr/bin/decode-syseeprom : ERROR : cannot load module: /usr/share/sonic/device/"x86_64-delta_dsc100-r0"/plugins/eeprom.py
admin@sonic:~$ sudo sfputil version
Failed to load platform module 'sfputil': [Errno 2] No such file or directory

In fact I see the closed issue #1433 ,
may be it's the same case with me in sfputil.py, and I pull the commit in sonic-utilities, but didn't solve my problem.
So I want to know whether I missed something, any advice?
Thanks for everyone.

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

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@pollyhsu2git
Copy link
Contributor

pollyhsu2git commented Mar 6, 2018

@ForzaTian, we've pulled / tested decode-syseeprom / sfputil with the commit id: 126d08d (dated Mar 5) OK here.

#####
root@sonic:/home/admin# sudo decode-syseeprom
TlvInfo Header:
Id String: TlvInfo
Version: 1
Total Length: 164
TLV Name Code Len Value
-------------------- ---- --- -----
Product Name 0x21 15 7816-64X-O-AC-F
Part Number 0x22 13 FP3ZZ7664005A
Serial Number 0x23 10 AH29042316
Base MAC Address 0x24 6 70:72:CF:0C:97:92
Manufacture Date 0x25 19 09/29/2017 13:39:29
Label Revision 0x27 3 R01
Platform Name 0x28 27 x86_64-accton_as7816_64x-r0
ONIE Version 0x29 13 2017.05.00.07
MAC Addresses 0x2A 2 131
Manufacturer 0x2B 6 Accton
Manufacture Country 0x2C 2 TW
Vendor Name 0x2D 8 Edgecore
Diag Version 0x2E 8 0.1.0.15
CRC-32 0xFE 4 0x015E69FC
(checksum valid)

root@sonic:/home/admin# sudo sfputil version
sfputil version 2.0

root@sonic:/home/admin# show ver
SONiC Software Version: SONiC.master.0-126d08d
Distribution: Debian 8.10
Kernel: 3.16.0-5-amd64
Build commit: 126d08d
Build date: Mon Mar 5 07:21:42 UTC 2018

@ForzaTian
Copy link
Author

@pollyhsu2git thanks for your timely reply.
But when I pull the latest commit in today (Mar 6) ,and compile again, the outputs of the two commands on my board have no change.
So may I ask you whether you do anything before you execute the commands on sonic shell?

Thanks again for your info.

@pollyhsu2git
Copy link
Contributor

pollyhsu2git commented Mar 6, 2018

@ForzaTian, NO~ We did not do any particular before the decode-syseeprom / sfputil commands. The attached ZIP is our test log for your reference.
SONic-V2-AS7816-l_master-20180305-126d08d0-sfputil_OK-20180306_1625.zip

@lguohan
Copy link
Collaborator

lguohan commented Mar 7, 2018

@ForzaTian , you can also download the latest image from https://sonic-jenkins.westus2.cloudapp.azure.com/job/broadcom/job/buildimage-brcm-all/

Does that work?

@ForzaTian
Copy link
Author

@lguohan Thanks for your reply.
But I am developing our project now, the code haven't pushed into github, so there is no debs for our project in jenkins and the image could not run on our board.

May I ask one more question?
I check the boot log on my board and find syncd segfault such as :
syncd[1752]: segfault at 15f6978 ip 00007f281b7ca04e sp 00007f281aea0c68 error 4 in libc-2.19.so[7f281b738000+1a1000]
syncd[1795]: segfault at 3f65458 ip 00007f569b0aa04e sp 00007f569a780c68 error 4 in libc-2.19.so[7f569b018000+1a1000]
syncd[1843]: segfault at 1529e68 ip 00007fabdca1a04e sp 00007fabdc0f0c68 error 4 in libc-2.19.so[7fabdc988000+1a1000]
I'm not sure whether it has influence on .py execution, so in your experience , what may lead to that error? Could you give me some advice?
If you have no experience for that , please ignore that question.
Thanks for your help.

@ForzaTian
Copy link
Author

Hi all:
Finally, I found the reason for my error.
It because the "onie_platform" value in machine.conf is not correct , which has been amended in onie project onie commit .
It has been a long time since my last update onie code, so I pull & compile it, and install sonic again, all the commands can work now.
Many thanks for all of your help.

prsunny added a commit that referenced this issue Mar 18, 2021
Updated with following commits:

19d4042 - 2021-03-16 : Add self timeout and crash if exceeded. (#1502) [Renuka Manavalan]
aa71231 - 2021-03-16 : [reboot]: Stop mux before reboot on dual ToR (#1500) [Lawrence Lee]
fbad274 - 2021-03-16 : Add 'show' and 'clear' command for PG drop (#1461) [Andriy Yurkiv]
0de99c3 - 2021-03-12 : [decode-syseeprom] When reading from DB, display CRC-32 and all Vendor Extensions (#1497) [Joe LeVeque]
569a079 - 2021-03-12 : [decode-syseeprom] When reading from DB, display CRC-32 and all Vendor Extensions (#1497) [Joe LeVeque]
47d1a14 - 2021-03-12 : [generate-dump] Remove Arista specific logic (#1482) [Samuel Angebault]
1260f90 - 2021-03-12 : [warm-reboot]: Check empty key before issuing redis hget (#1496) [Vaibhav Hemant Dixit]
daall added a commit to daall/sonic-buildimage that referenced this issue Mar 19, 2021
…or 202012

sonic-swss
* [nbrmgrd] added function to parse IP address from APP_DB (sonic-net#1672)
* [MUX/PFCWD] Use in_ports for acls instead of seperate ACL table (sonic-net#1670)
* [mux] VS test for neigh, route and fdb (sonic-net#1656)
* [Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (sonic-net#1652)
* spell check fixes (sonic-net#1630)

sonic-utilities
* [reboot]: Stop mux before reboot on dual ToR (sonic-net#1500)
* [config] Disable/enable container monitoring when stopping/starting services (sonic-net#1499)
* Add 'show' and 'clear' command for PG drop (sonic-net#1461)
* [CLI][techsupport] Add NOOP option for commands that did not have that option (sonic-net#1445)
* [202012][reload] Improve reload by using sonic.target (sonic-net#1509)

Signed-off-by: Danny Allen <daall@microsoft.com>
daall added a commit that referenced this issue Mar 24, 2021
…or 202012 (#7105)

sonic-swss
* [nbrmgrd] added function to parse IP address from APP_DB (#1672)
* [MUX/PFCWD] Use in_ports for acls instead of seperate ACL table (#1670)
* [mux] VS test for neigh, route and fdb (#1656)
* [Dynamic buffer calc] Bug fix: Remove PGs from an administratively down port. (#1652)
* spell check fixes (#1630)

sonic-utilities
* [reboot]: Stop mux before reboot on dual ToR (#1500)
* [config] Disable/enable container monitoring when stopping/starting services (#1499)
* Add 'show' and 'clear' command for PG drop (#1461)
* [CLI][techsupport] Add NOOP option for commands that did not have that option (#1445)
* [202012][reload] Improve reload by using sonic.target (#1509)

Signed-off-by: Danny Allen <daall@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this issue May 10, 2021
* What I did
Added new CLI commands to view and clear PG dropped packet statistics.
Added the new CLI commands to the command reference guide.

* How I did it
I have added script which can generate table that shows current PG dropped packet statistic and also can clean it
Clean and Show is implemented with using serialized stats from previous execution.
To calculate current stats we do next step:
- take old serialized data (if no 'clear' executed all serialized data is 0)
- take current stat
- show diff between current and old

* How to verify it
run
show priority-group drop counters - show current stat
sonic-clear priority-group drop counters - clear current stat

* New command output (if the output of a command-line utility has changed)
show priority-group drop counters
Ingress PG dropped packets:
     Port    PG0    PG1    PG2    PG3    PG4    PG5    PG6    PG7
---------  -----  -----  -----  -----  -----  -----  -----  -----
Ethernet0    800    801    802    803    804    805    806    807
Ethernet4    400    401    402    403    404    405    406    407
Ethernet8    100    101    102    103    104    105    106    107
...
sonic-clear priority-group drop counters
Cleared PG drop counters

Co-authored-by: ayurkiv <ayurkiv@contoso.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this issue May 23, 2021
Updated with following commits:

19d4042 - 2021-03-16 : Add self timeout and crash if exceeded. (sonic-net#1502) [Renuka Manavalan]
aa71231 - 2021-03-16 : [reboot]: Stop mux before reboot on dual ToR (sonic-net#1500) [Lawrence Lee]
fbad274 - 2021-03-16 : Add 'show' and 'clear' command for PG drop (sonic-net#1461) [Andriy Yurkiv]
0de99c3 - 2021-03-12 : [decode-syseeprom] When reading from DB, display CRC-32 and all Vendor Extensions (sonic-net#1497) [Joe LeVeque]
569a079 - 2021-03-12 : [decode-syseeprom] When reading from DB, display CRC-32 and all Vendor Extensions (sonic-net#1497) [Joe LeVeque]
47d1a14 - 2021-03-12 : [generate-dump] Remove Arista specific logic (sonic-net#1482) [Samuel Angebault]
1260f90 - 2021-03-12 : [warm-reboot]: Check empty key before issuing redis hget (sonic-net#1496) [Vaibhav Hemant Dixit]
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this issue Aug 7, 2021
Updated with following commits:

19d4042 - 2021-03-16 : Add self timeout and crash if exceeded. (sonic-net#1502) [Renuka Manavalan]
aa71231 - 2021-03-16 : [reboot]: Stop mux before reboot on dual ToR (sonic-net#1500) [Lawrence Lee]
fbad274 - 2021-03-16 : Add 'show' and 'clear' command for PG drop (sonic-net#1461) [Andriy Yurkiv]
0de99c3 - 2021-03-12 : [decode-syseeprom] When reading from DB, display CRC-32 and all Vendor Extensions (sonic-net#1497) [Joe LeVeque]
569a079 - 2021-03-12 : [decode-syseeprom] When reading from DB, display CRC-32 and all Vendor Extensions (sonic-net#1497) [Joe LeVeque]
47d1a14 - 2021-03-12 : [generate-dump] Remove Arista specific logic (sonic-net#1482) [Samuel Angebault]
1260f90 - 2021-03-12 : [warm-reboot]: Check empty key before issuing redis hget (sonic-net#1496) [Vaibhav Hemant Dixit]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants