Skip to content

Instantly share code, notes, and snippets.

@metalivedev
Forked from samalba/gist:5400413
Last active August 29, 2015 14:01
Show Gist options
  • Save metalivedev/ce45d4278410807a91e3 to your computer and use it in GitHub Desktop.
Save metalivedev/ce45d4278410807a91e3 to your computer and use it in GitHub Desktop.
Clean up hung kworkers, usually caused by some container
echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
cat /sys/kernel/debug/tracing/trace_pipe > out.txt
# (Leave it running a couple of seconds, then Ctrl+C; this is just to flush the buffer)
# Do it again to get fresh info
cat /sys/kernel/debug/tracing/trace_pipe > out.txt
(Leave it running a couple of seconds, then Ctrl+C; this is to recover the data)
cut -d- -f2 out.txt | awk '{print $1}' | sort | uniq -c | sort -n
# Take a look at who's got the most instructions queued (first column) and kill them and their children
# Sam dumped something out of the cgroup to get the process list and ran xargs kill -9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment