Bug 8326 - syslogd: improve duplicate detection
Summary: syslogd: improve duplicate detection
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.24.x
Hardware: All All
: P5 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-04 09:11 UTC by Bernhard Breinbauer
Modified: 2015-09-15 19:01 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
syslog dup detection improvement (2.05 KB, patch)
2015-09-04 09:12 UTC, Bernhard Breinbauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Breinbauer 2015-09-04 09:11:26 UTC
The current implementation of ENABLE_FEATURE_SYSLOGD_DUP includes the timestamp into the comparison of current and previous log message. Therefore duplicates are only detected if they appear in the same second.

The following patch moves the detection into timestamp_and_log() where the timestamp has been removed and also adds a message how often a message was repeated.
Comment 1 Bernhard Breinbauer 2015-09-04 09:12:24 UTC
Created attachment 6151 [details]
syslog dup detection improvement
Comment 2 Denys Vlasenko 2015-09-15 19:01:27 UTC
(In reply to comment #0)
> The current implementation of ENABLE_FEATURE_SYSLOGD_DUP includes the timestamp
> into the comparison of current and previous log message. Therefore duplicates
> are only detected if they appear in the same second.

This is intended. If a message repeats *occasionally*, say, every 3 seconds, current code shows it. It suppresses the case when the same message repeats with high frequency.