I can do
ps -o "pid,ppid,args" -p my_pid to find the parent of
I can continue
ps -o "pid,ppid,args" -p previously_found_ppid in a loop until get to
However, I bet, there is a single call solution that would start with
my_pid and list all its ancestors. Something reverse to
pstree that starts with the parent and list all its descendants. Could you tell whether such Unix/Linux command is readily available?