Skip to content

Instantly share code, notes, and snippets.

@neenaoffline
Last active October 28, 2015 13:19
Show Gist options
  • Save neenaoffline/303ba53f35c5ceb79b24 to your computer and use it in GitHub Desktop.
Save neenaoffline/303ba53f35c5ceb79b24 to your computer and use it in GitHub Desktop.
quick tcpdump across hosts
from fabric.api import env, sudo, get, parallel
@parallel
def tcpdump():
sudo("timeout --preserve-status 10s tcpdump -w fabric.tcpdump")
@parallel
def get_dumps():
get("fabric.tcpdump", "%s.fabric.tcpdump" % env.host)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment