-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[arp_update]: Use parent script PID for logger calls #19219
[arp_update]: Use parent script PID for logger calls #19219
Conversation
Signed-off-by: Lawrence Lee <[email protected]>
Could you please update description and whats the behavior before and after this change? |
@kperumalbfn , can you please review/merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@theasianpianist , can you confirm it is tested for the following scenarios and logging works as expected?
|
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
Cherry-pick PR to 202305: #19258 |
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
Co firmed, logging works as expected here |
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
Cherry-pick PR to 202405: #19292 |
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
used parent script PID for logger calls (sonic-net#19219)
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
[arp_update]: Use parent script PID for logger calls Signed-off-by: Lawrence Lee <[email protected]>
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
logger
command 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)