#!/bin/sh for pid in $(pgrep -u apache httpd); do echo Process $pid pstack $pid | grep ^#0 | grep -v _wait done