Inside Tetragon: How eBPF Powers Process Lifecycle Monitoring

On Mar 15, 2025, I had the pleasure of presenting at the Cloud Native Community Japan - eBPF Japan Meetup #3, where I introduced Tetragon's implementation of eBPF-based Process Lifecycle Monitoring. I'd like to share a brief overview of my talk in this blog post. About TetragonProcess Lifecycle MonitoringTechnical Deep DiveLooking Forward You can access… Continue reading Inside Tetragon: How eBPF Powers Process Lifecycle Monitoring

Tetragon-mini by Rust: eBPF-based process monitoring

TL;DR; I created eBPF-based software in Rust that can monitor the Process lifecycle.πŸ¦€πŸ πŸš€ process 101708: root: /usr/sbin/iptables πŸ’₯ exit 101708: root: /usr/sbin/iptables πŸš€ process 101705: yukinakamura: /usr/bin/cat πŸ’₯ exit 101705: yukinakamura: /usr/bin/cat πŸš€ process 101758: yukinakamura: /usr/bin/sed πŸ’₯ exit 101758: yukinakamura: /usr/bin/sed MotivationScopeArchitecture OverviewHow to RunPrerequisitesClone the RepositoryGenerate Struct codesBuild and Run eBPF Programs… Continue reading Tetragon-mini by Rust: eBPF-based process monitoring

eBPF Tail Calls with Rust Aya

TL;DR This guide demonstrates how to implement eBPF Tail Calls using Rust's Aya. πŸ¦€πŸ Introduction: Tail CallsRun eBPF Tail Calls programPrerequisitesClone the RepositoryGenerate Struct codesBuildRunCheck logsCheck eBPF Programs and Maps in the KerneleBPF ProgramsLoaded eBPF ProgramsAttached eBPF ProgramseBPF Map for tail callsRust Code HighlightsProgramArray SetupTail CallsState Sharing with PerCpuArrayReferencesWrap up Introduction: Tail Calls Tail calls… Continue reading eBPF Tail Calls with Rust Aya

Writing eBPF Kprobe Program with Rust Aya

TL;DR In this post, I’ll walk you through an example of an eBPF Kprobe program using Aya with Rust. πŸ¦€πŸ Introduction: KprobesRun eBPF Kprobe tracing programPrerequisitesCheck available KprobesClone the RepositoryGenerate Structs codesBuildRunTestCheck eBPF Program in the KernelCheck with bpftool(Optional) Check with bpftopArgument Handling in KprobesHow to Identify Argument TypesGenerate Struct Codes by aya-toolRead values from… Continue reading Writing eBPF Kprobe Program with Rust Aya

Writing eBPF RawTracepoint Program with Rust Aya

TL;DR In this post, I’ll walk you through an example of an eBPF RawTracepoint program using Aya with Rust. πŸ¦€πŸ Introduction: RawTracepoints vs TracepointsArgument HandlingPerformanceRun eBPF RawTracepoint tracing programPrerequisitesCheck available TracepointsClone the RepositoryGenerate Structs codesBuild and RunCheck eBPF Program in the KerneleBPF ProgramAttachment to RawTracepointArgument Handling in RawTracepointsHow to Identify Argument TypesGenerate Struct Codes by… Continue reading Writing eBPF RawTracepoint Program with Rust Aya

Tetragon Process Lifecycle Observation: eBPF Part

TL;DR In this post, I explain how Tetragon detects process creation and termination using eBPF.🐝 IntroductionOverviewkprobes and tracepointseBPF ProgramseBPF MapsTetragon AgentProcess creationeBPF program attached to tracepointWrite data to eBPF MapProcess terminationeBPF program attached to tracepointWrite data to eBPF MapWrap upNext stepRelated posts Introduction I was really impressed when I used Tetragon for the first time.… Continue reading Tetragon Process Lifecycle Observation: eBPF Part

Use a private RUN cache between builds in BuildKit

TL;DR This post provides hands-on tutorial on how to use a private RUN cache that is defined by RUN --mount=type=cache, sharing=private in Dockerfile. Here is a snippet of Dockerfile. RUN --mount=type=cache,id=private-cache,target=/root/.cache,sharing=private \ echo $(date):" private1 is writing..." && \ echo $(date)": Hello from private1" >> /root/.cache/private.log && \ sleep 10 && \ echo "--- private.log ---------"… Continue reading Use a private RUN cache between builds in BuildKit