kubectl-prof icon indicating copy to clipboard operation
kubectl-prof copied to clipboard

pgrep option cannot be used

Open naing2victor opened this issue 1 year ago • 0 comments

Command

kubectl prof -n test-ns test-pod -e wall -t 30s -l java -o flamegraph --tool async-profiler --pgrep java

Output

Verifying target pod ... ✔
Launching profiler ... ✔
Profiling ... ✔
Error: read file failed: /run/containerd/io.containerd.runtime.v2.task/k8s.io/8bfe532379ca8f863cbc765fd5e2cf3619a3091f5d663dbc29b4ffcd1a27b3bd/init.pid: open /run/containerd/io.containerd.runtime.v2.task/k8s.io/8bfe532379ca8f863cbc765fd5e2cf3619a3091f5d663dbc29b4ffcd1a27b3bd/init.pid: no such file or directory ❌

If i go and check inside the node there is no init.pid file. instead pid file is {{ContainerID}}.pid

ls -lh /run/containerd/io.containerd.runtime.v2.task/k8s.io/8bfe532379ca8f863cbc765fd5e2cf3619a3091f5d663dbc29b4ffcd1a27b3bd

Output

total 44K
-rw-r--r-- 1 root root    7 Oct  8 11:42 6e0a530f2f6ad066ca17099a87a51dc391733a4f3f213f14bf3227328d554fe4.pid
-rw-r--r-- 1 root root    6 Oct  8 01:13 8bfe532379ca8f863cbc765fd5e2cf3619a3091f5d663dbc29b4ffcd1a27b3bd.pid
-rw-r--r-- 1 root root  104 Oct  8 01:13 address
-rw-r--r-- 1 root root  17K Oct  8 01:13 config.json
prwx------ 1 root root    0 Oct  8 01:13 log
-rw-r--r-- 1 root root    0 Oct  8 01:13 log.json
-rw-r--r-- 1 root root  191 Oct  8 01:13 options.json
drwxr-xr-x 1 root root 4.0K Oct  8 01:13 rootfs
-rw-r--r-- 1 root root    0 Oct  8 01:13 runtime
-rw------- 1 root root   38 Oct  8 01:13 shim-binary-path
lrwxrwxrwx 1 root root  121 Oct  8 01:13 work -> /var/lib/containerd/io.containerd.runtime.v2.task/k8s.io/8bfe532379ca8f863cbc765fd5e2cf3619a3091f5d663dbc29b4ffcd1a27b3bd

naing2victor avatar Oct 09 '24 05:10 naing2victor