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

Update sonic-qsfp-monitor #9737

Open
wants to merge 1 commit into
base: 201911
Choose a base branch
from

Conversation

HaoweiChung
Copy link

Why I did it

Missing syslog for transceiver inserted/removed event

How I did it

Add syslog (priority:info) for transceiver inserted and removed

How to verify it

Testing with transceiver insert and remove in SONiC runtime and check the syslog message

Which release branch to backport (provide reason below if selected)

  • 201811
  • [x ] 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Why I did it
Missing syslog for transceiver inserted/removed event

How I did it
Add syslog (priority:info) for transceiver inserted and removed

How to verify it
Testing with transceiver insert and remove in SONiC runtime and check the syslog message

Which release branch to backport (provide reason below if selected)
201911
Comment on lines +277 to +289

pre_present=$(cat $cpld_path"module_present_"$i | awk '{printf $1}')
if [ $is_presence -eq 0 ];then
if [ $pre_present -eq 0 ];then
ethid=`expr $idx \* 8`
logger -i -t sonic-qsfp-monitor "Ethernet$ethid: Transceiver is inserted" --priority user.info
fi
else
if [ $pre_present -eq 1 ];then
ethid=`expr $idx \* 8`
logger -i -t sonic-qsfp-monitor "Ethernet$ethid: Transceiver is removed" --priority user.info
fi
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

xcvrd already monitors for presence of qsfp. why is this separate monitoring used in your platform?

Copy link
Author

Choose a reason for hiding this comment

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

Our platform has a BMC module to collect all platform information, so we use this task to do transceiver data polling from BMC and pass those data to SONiC platform driver. Then xcvrd can read transceiver data from platform driver to do it's work.

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

Successfully merging this pull request may close these issues.

2 participants