iovisor / iovisor/bcc

How can I get container id from cgroup v1 with ebpf code?

Open
#4,732 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

How can I get container id from cgroup v1 with ebpf code? I can access task_struct->cgroups, but it(task_struct->cgroups) pointer content all zero.so I try task_struct->sched_task_group ,but always can not get container id。I try task_struct->group_leader and (task_struct->cgroups->dfl_cgrp) ,but result all failed.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no repository file, test, or entry point. Start by tracing how BCC handles eBPF access to task_struct and cgroup v1 data, then reproduce the reported zero or failed lookups; done means establishing a verified way to obtain the container ID or documenting the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.