Reputation: 121
Suppose I saw a process X in output of top or ps, I want to know which shell script started it, is there a easy way? I think it's too stupid to find/grep the whole harddisk.
EDIT: I just want to find the script file name and path, not the command line which start the process.
Upvotes: 0
Views: 88
Reputation: 392
In ps, there is the ability to view ppid, the parent process id. That will indicate the process that started the child. For a prettier display, check out pstree.
Upvotes: 1