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

RFE: add kernel audit queue statistics #63

Open
stevegrubb opened this issue Jul 27, 2017 · 5 comments
Open

RFE: add kernel audit queue statistics #63

stevegrubb opened this issue Jul 27, 2017 · 5 comments

Comments

@stevegrubb
Copy link

People have varying workloads as well as audit rules. Right now the consensus is to set the backlog to 8192. This eats up memory on some smaller systems. It should be simple to add an unsigned int to hold the value of the maximum depth used in the backlog. It would be displayed as part of the audit status control response. With this, people could make an educated guess about how deep to make the backlog. We may even be able to cut the recommendation down with some hard evidence.

@pcmoore pcmoore changed the title RFE - Add max_backlog statistic RFE: Add max_backlog statistic Jul 27, 2017
@pcmoore
Copy link
Contributor

pcmoore commented Jul 27, 2017

It is important to keep in mind that the backlog setting doesn't reserve any memory, it simply allows the backlog to grow up to a specified limit. If the backlog queue is eating up memory on smaller systems then the real problem isn't the backlog setting, it is either an overly verbose set of audit rules, problems reading the backlog quickly (auditd), or both.

I'm strongly tempted to close this as I don't see this as a problem, but I'll leave it open so @stevegrubb can respond and perhaps provide more information on the reason for this request.

@pcmoore pcmoore self-assigned this Jul 27, 2017
@stevegrubb
Copy link
Author

Yeah, looks like the skb_queue_tail changed how it used to work. It would still be useful to gather metrics.

@pcmoore
Copy link
Contributor

pcmoore commented Jul 27, 2017

Okay, queue stats are something else entirely, and I fear that a single maximum backlog depth value by itself isn't going to be terribly interesting. I'm going to adjust this RFE to be about better audit queue statistics and we can sort out what that means (e.g. avg queue depth, max queue depth, last 24h, etc.).

@pcmoore pcmoore changed the title RFE: Add max_backlog statistic RFE: add kernel audit queue statistics Jul 27, 2017
@pcmoore
Copy link
Contributor

pcmoore commented Jun 24, 2020

Related list discussion from spring/summer 2020:

@rgbriggs
Copy link
Contributor

rgbriggs commented Jun 25, 2021

See Max Englander's 2020-07-04 v5.9-rc1 b43870c ("audit: report audit wait metric in audit status reply").

In audit_log_start() in the ratelimited case, add audit_backlog_wait_time_actual to the stats printed to klog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants