Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ps -fe | awk -v pid=$1 '
BEGIN{if(!pid){
t="/dev/tty";printf "PID ? ">t;getline<t;pid+=$1
}}
function child(id ,i){
print line[id];if(id==pid)printf "\n"
for(i in ppid) if(ppid[i]==id) child(i)
}
function parent(id ,i){
i=ppid[id]
if(line[i]>"" && i!=id) buf=parent(i)"\n"line[i]
return buf
}
$2==pid{++found}
{ppid[$2]=$3;line[$2]=$0}
END{if(found){
print line["PID"]"\n"parent(pid)"\n";child(pid)
}}
'
print line["PID"];child(pid)
print line["PID"]parent(pid)"\n"line[pid]