Skip to main content
Version: latest

snapshot_process

The snapshot_process shows running processes.

Getting started

Running the gadget:

$ kubectl gadget run ghcr.io/inspektor-gadget/gadget/snapshot_process:latest [flags]

Flags

--threads

Show all threads (by default, only processes are shown)

Default value: "false"

Guide

Run a pod / container:

$ kubectl run --restart=Never --image=busybox test-snapshot-process -- sh -c 'sleep inf'
pod/test-snapshot-process created

Then, run the gadget and see how it shows the sleep process:

$ kubectl gadget run snapshot_process:latest
K8S.NODE K8S.NAMESPACE K8S.PODNAME K8S.CONTAINERNAME COMM PID TID UID GID PPID
minikube-docker default test-snap…t-process test-snapshot-proce sh 530932 530932 0 0 530911
^C

Finally, clean the system:

$ kubectl delete pod test-snapshot-process