On a server I ran a debug intense script and unfortunately my session was interrupted (broken pipe).
I logged in again and apparently the script is still running:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
139038 root 20 0 844140 339612 35460 S 21.6 4.2 189:38.92 python3.10
96624 root 20 0 1519664 106096 15672 S 3.3 1.3 436:23.05 python3
75514 root 20 0 636272 187972 12116 S 0.3 2.3 10:37.75 python3.10
1 root 20 0 4152 48 4 S 0.0 0.0 0:00.04 bash
Is there any chance to re-enter the script?
reptyr. – Kamil Maciorowski Feb 27 '23 at 15:29# reptyr -T 139038 Unable to attach to pid 139038: Operation not permitted The kernel denied permission while attaching. If your uid matches the target's, check the value of /proc/sys/kernel/yama/ptrace_scope. For more information, see /etc/sysctl.d/10-ptrace.conf– Qohelet Feb 27 '23 at 15:43# kernel.yama.ptrace_scope = 0 bash: kernel.yama.ptrace_scope: command not found- also I would have to reboot anyway – Qohelet Feb 27 '23 at 17:06echo 0 > /proc/sys/kernel/yama/ptrace_scopeis a shell command to change the setting immediately.kernel.yama.ptrace_scope = 0is not a command, it's a line to place in the mentioned file/etc/sysctl.d/10-ptrace.conf. – Kamil Maciorowski Feb 27 '23 at 17:19