For the last couple of days, I've woken up to find rsync churning away with 1.6GB of memory, slowing my Mac down significantly. Activity Monitor only says that rsync is coming from sh, but I'm trying to track down more info; specifically, what shell script is calling rsync. How can I find that out?
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.
It's simple. Use the ps command to check the parent of the rsync process, something like this.
Use this command
# ps -ef | grep rsync
This will give you the process ID of the rsync script. This will also give the process id of the parent script which is running that rsync process.
Then use this command
# ps -ef | grep parent_process_id
This will tell you the name of the script which is running the rsync script.
Hope this helped.