Skip to content

Instantly share code, notes, and snippets.

@whylom
Created April 20, 2012 22:07
Show Gist options
  • Save whylom/2432236 to your computer and use it in GitHub Desktop.
Save whylom/2432236 to your computer and use it in GitHub Desktop.
leggo: idea for a utility to kill a process that's using a specific port
$ leggo 3306
Port 3306 is being used by "mysqld"
process 66117 | started 4:53PM | up for 0:01.25
/usr/local/Cellar/mysql/5.5.20/bin/mysqld
--basedir=/usr/local/Cellar/mysql/5.5.20
--datadir=/usr/local/var/mysql
--plugin-dir=/usr/local/Cellar/mysql/5.5.20/lib/plugin
--log-error=/usr/local/var/mysql/davidmachine.local.err
--pid-file=/usr/local/var/mysql/davidmachine.local.pid
Kill process 66117? (y/n) y
Process 66117 is all kinds of dead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment