progbypid() { pid=$1 ps auxw | awk -v pid=$pid '{if ($2==pid) {for (i=11;i<=NF;i++){prg=prg" "$i};print prg}}' }
$ pstack {pid} | head -1