Skip to content

Instantly share code, notes, and snippets.

@albanpeignier
Created February 12, 2010 15:40
Show Gist options
  • Select an option

  • Save albanpeignier/302662 to your computer and use it in GitHub Desktop.

Select an option

Save albanpeignier/302662 to your computer and use it in GitHub Desktop.
#!/bin/sh
# List processes which are using alsa devices
lsof +D /dev -F rt | awk '/^p/ {pid=$1} /^t/ {type=$1} /^r0x(74|e)..$/ && type == "tCHR" {print pid}' | cut -c 2- | uniq | xargs ps -fp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment