Skip to content

Conversation

@Kaben123
Copy link

Limit the maximum number of log entries allowed within the specified time interval in seconds.

Note: Please adhere to Contributing Guidelines.

Summary

Update this section with information on why change is necessary,
what it exactly does and how, if new feature shows up, provide
references (dependencies, similar problems and solutions), etc.

Impact

Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.

Testing

This section should provide a detailed description of what you did
to verify your changes work and do not break existing code.

Please provide information about your host machine, the board(s) you
tested your changes on, and how you tested. Logs should be included.

For example, when changing something in the core OS functions, you
may want to run the OSTest application to verify that there are no
regressions. Changes to ADC code may warrant running the adc
example. Adding a new uORB driver may require that you run
uorb_listener to verify correct operation.

Pure documentation changes can just be tested with make html
(see docs) and verification of the correct format in your
browser.

PRs without testing information will not be accepted. We will
request test logs.

Limit the maximum number of log entries allowed within
the specified time interval in seconds.

Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
@github-actions github-actions bot added Area: Drivers Drivers issues Size: M The size of the change in this PR is medium labels Jan 23, 2026
@jerpelea jerpelea changed the title driver/ramlog: Implement the rate limiting function for ramlog driver. driver/syslog: Implement the rate limiting function for ramlog driver. Jan 23, 2026
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

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

@Kaben123 thank you for adding a new feature to syslog. All new features need to be properly documented. Please update https://nuttx.apache.org/docs/latest/components/drivers/special/syslog.html#syslog

Where and how these new IOCTLs will be called? Please provide some tool to control syslog?

In the Linux kernel we have /proc/sys/kernel/printk_ratelimit that control the something similar.
For the journald we have /etc/systemd/journald.conf:

RateLimitIntervalSec=30s
RateLimitBurst=1000

We need to have something similar or at least a Kconfig to setup the default parameters

@acassis acassis requested review from jerpelea and linguini1 January 23, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Drivers Drivers issues Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants