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

tetragon: Assorted fixes #2748

Merged
merged 5 commits into from
Jul 31, 2024
Merged

tetragon: Assorted fixes #2748

merged 5 commits into from
Jul 31, 2024

Conversation

olsajiri
Copy link
Contributor

@olsajiri olsajiri commented Jul 29, 2024

adding missing docs and cgroup rate fixes

olsajiri added 3 commits July 29, 2024 13:03
Adding docs for the cgroup rate limit.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding docs for the persistent enforcement.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding cgroup-rate-map.sh script to display cgroup_rate_map values.

It takes argument either ID of the map or its pinned path.

Example output:

  # ./contrib/scripts/cgroup-rate-map.sh
  id      cpu     curr    prev    rate    time    throttled
  31250   0       2       0       2       669596000000000 0
  31250   1       1       0       1       669596000000000 0
  31250   2       1       0       1       669596000000000 0
  31250   3       8       31      20      669594000000000 0
  id      cpu     curr    prev    rate    time    throttled
  33803   0       1       1       1       669561000000000 0
  33803   1       1       4       4       669561000000000 0
  33803   2       4       0       4       669559000000000 0
  33803   3       2       1       2       669561000000000 0
  id      cpu     curr    prev    rate    time    throttled
  11218   0       0       0       0       0       0
  11218   1       4       0       4       669538000000000 0
  11218   2       1       0       1       669561000000000 0
  11218   3       1       4       3       669562000000000 0
  id      cpu     curr    prev    rate    time    throttled
  26      0       1       0       1       669562000000000 0
  26      1       5       0       5       669561000000000 0
  26      2       0       0       0       0       0
  26      3       5       0       5       669538000000000 0

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Copy link

netlify bot commented Jul 29, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit e240572
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/66a79642b6d9d80008d4e38d
😎 Deploy Preview https://deploy-preview-2748--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@olsajiri olsajiri added the release-note/misc This PR makes changes that have no direct user impact. label Jul 29, 2024
Adding extra log output for max entries for loaded map:

  logcapture.go:25: time="2024-07-29T10:22:07Z" level=info msg="tetragon, map loaded." map=tg_stats_map max="{0 false}" ..
  logcapture.go:25: time="2024-07-29T10:22:07Z" level=info msg="tetragon, map loaded." map=cgroup_rate_map max="{32768 true}" ...

The value is the configured maximum or zero if it wasn't configured
and stays on default (hardcoded in bpf code).

The bool value is the indicator if the number was configured.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch from e240572 to 61788b8 Compare July 29, 2024 16:20
Making sure we evict inactive values from cgroup_rate_map map
once per minute.

We do have cleanup hook on cgroup_rmdir tracepoint, but we can
still end up with leftover records in cgroup_rate_map for quiet
cgroups.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
@olsajiri olsajiri force-pushed the pr/olsajiri/fixes branch from 61788b8 to 2943ad2 Compare July 29, 2024 16:32
@olsajiri olsajiri changed the title Pr/olsajiri/fixes tetragon: Assorted fixes Jul 29, 2024
@olsajiri olsajiri marked this pull request as ready for review July 29, 2024 20:21
@olsajiri olsajiri requested review from mtardy and a team as code owners July 29, 2024 20:21
@olsajiri olsajiri requested a review from kkourt July 29, 2024 20:22
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

🚀

@olsajiri olsajiri merged commit 1a0ed6c into main Jul 31, 2024
46 checks passed
@olsajiri olsajiri deleted the pr/olsajiri/fixes branch July 31, 2024 12:40
mtardy added a commit that referenced this pull request Jul 31, 2024
I was too slow to review #2748 properly and some things could have been
enhanced on the docs side. Here are some changes.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
@mtardy
Copy link
Member

mtardy commented Jul 31, 2024

Hey 👋 I was too slow so here is my docs review under the form of a PR that you can merge if that suits you! #2760

mtardy added a commit that referenced this pull request Aug 5, 2024
I was too slow to review #2748 properly and some things could have been
enhanced on the docs side. Here are some changes.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants