#!/bin/bash ps aux | awk '{ print $8 " " $2 }' | grep -w Z | awk '{ print $2 }' | while read pid; do echo "PID: $pid"; pstree $pid; done;