#!/usr/bin/env bash
# lshung -- list processes in uninterruptible sleep

if (( UID != 0 )); then
	echo "${0##*/}: not enough privileges to see wchan information" >&2
fi

ps -e -o pid,ppid,stat,wchan:22,command | awk 'NR == 1 || $3 ~ /^[DZ]/'
