[arp_update]: Use parent script PID for logger calls#19219
Merged
kperumalbfn merged 1 commit intosonic-net:masterfrom Jun 8, 2024
Merged
[arp_update]: Use parent script PID for logger calls#19219kperumalbfn merged 1 commit intosonic-net:masterfrom
kperumalbfn merged 1 commit intosonic-net:masterfrom
Conversation
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Contributor
|
Could you please update description and whats the behavior before and after this change? |
prsunny
approved these changes
Jun 8, 2024
Contributor
|
@kperumalbfn , can you please review/merge? |
Contributor
|
@theasianpianist , can you confirm it is tested for the following scenarios and logging works as expected?
|
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jun 10, 2024
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Collaborator
|
Cherry-pick PR to 202305: #19258 |
mssonicbld
pushed a commit
that referenced
this pull request
Jun 10, 2024
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Contributor
Author
Co firmed, logging works as expected here |
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jun 12, 2024
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Collaborator
|
Cherry-pick PR to 202405: #19292 |
mssonicbld
pushed a commit
that referenced
this pull request
Jun 15, 2024
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
MuLinForest
pushed a commit
to MuLinForest/sonic-buildimage
that referenced
this pull request
Aug 6, 2024
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
MuLinForest
pushed a commit
to MuLinForest/sonic-buildimage
that referenced
this pull request
Aug 6, 2024
used parent script PID for logger calls (sonic-net#19219)
theasianpianist
added a commit
to theasianpianist/sonic-buildimage
that referenced
this pull request
Aug 28, 2024
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
11 tasks
yxieca
pushed a commit
that referenced
this pull request
Aug 28, 2024
qiluo-msft
reviewed
Jul 9, 2025
| # Overload `logger` command to include arp_update tag | ||
| logger () { | ||
| command logger -t "arp_update" "$@" | ||
| command logger -i "$$" -t "arp_update" "$@" |
Collaborator
There was a problem hiding this comment.
Suggested change
| command logger -i "$$" -t "arp_update" "$@" | |
| command logger --id="$$" -t "arp_update" "$@" |
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
When a script calls the logger utility, each individual call gets its own PID assigned. Rsyslogd creates an internal rate-limit object per PID that sends a log message. If the logger utility is called repeatedly, it will cause rsyslogd memory usage to increase permanently since a rate-limit object is being created for each call.
Work item tracking
How I did it
Override the
loggercommand in the arp_update script to use the --id argument to specify the parent script PID that rsyslogd should use for rate limiting.How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)