jgoenetxea
5/7/2019 - 7:52 AM

How to trace process user

How to know who lauched that process

First, you need to know the process id, and then check if the launch command has significant info:

$ ps aux | grep $pid

Then check if the program path has any clue:

$ sudo ls -l /proc/$pid/exe 

If not, try checking the current path of the execution:

$ sudo pwdx $pid

If nothing works, check the open files from that process:

$ sudo ps auxwe | grep $pid

Show docker container information:

$ for i in $(docker container ls --format "{{.ID}}"); do docker inspect -f '{{.State.Pid}} {{.Name}}' $i; done