Fields
Unique identifier for the network namespace, generated by the kernel.This cookie is obtained via
bpf_get_netns_cookie() and provides a stable identifier across namespace operations. May not be available on older kernels (< 5.7).Namespace inode number.This is the inode number of the network namespace, visible in
/proc/PID/ns/net. Can be used to identify which namespace a process belongs to.Display Format
With cookie:Examples
Example JSON
With Cookie
Without Cookie (Older Kernel)
Container Namespace
Complete Event Example
When This Section Appears
The netns section is populated when:- The probe has access to namespace information
- Obtained from the network device or socket (in that order)
- The collector can retrieve namespace context
Namespace Identification
Default Namespace
The initial/default network namespace typically has inum4026531840 on most systems.
Container Namespaces
Containers (Docker, Kubernetes pods, etc.) run in separate network namespaces with different inum values.Finding Process Namespace
Map events to processes using the namespace inum:4026532448) is the inum value.
Listing All Network Namespaces
Namespace Cookie
Thecookie field provides a more stable identifier than inum:
- cookie: Randomly generated by kernel, stable across namespace lifetime
- inum: Can be reused after namespace deletion
cookie when available for correlating events across time.
Use Cases
Multi-tenant Environments
In multi-tenant systems (Kubernetes, OpenStack), use namespace information to:- Filter events by tenant/pod
- Isolate traffic analysis per container
- Track cross-namespace communication
Namespace Transitions
Watch for namespace changes as packets traverse the stack:Network Debugging
Identify which namespace is experiencing issues:Kernel Version Compatibility
Thecookie field availability depends on kernel version:
| Kernel Version | Cookie Support |
|---|---|
| < 5.7 | No (null) |
| >= 5.7 | Yes |
inum is available.
Display with Device Section
The netns and dev sections are typically displayed together:- Which namespace the event occurred in
- Which network device was involved
- Optional receive interface
The namespace information is retrieved from the device or associated socket. If neither is available at the probe point, this section may not appear.
