Skip to content

Instantly share code, notes, and snippets.

View ctheune's full-sized avatar

Christian Theune ctheune

View GitHub Profile
@ctheune
ctheune / gist:6883842
Last active December 24, 2015 23:58
Debugging kernel issues with perf. Specifically used some of those for debugging our KVM networking issue. Extracted from instructions here: http://comments.gmane.org/gmane.comp.emulators.kvm.devel/113211
This is using perf 3.4 which seems to be a little old and missing some options.
Establish probes and start recording:
$ perf probe start_xmit
$ perf probe virtqueue_kick
$ perf record -a -e net:net_dev_xmit -e net:net_dev_queue -e probe:start_xmit -e probe:virtqueue_kick -R&
[...attempt to transmit packets inside guest...]
@ctheune
ctheune / runpuppet
Last active December 24, 2015 23:39
MPSSH snippets that I used to force changes through our infrastructure in an emergency script: force r-up-on for a set of machines, speed up reboots and verify machines that have been updated.

Expediate a puppet run on all machines, with at most 30 working at once

mpssh -p 30 -f vms -s -u root -r runpuppet

Poll for machines currently running our puppet wrapper

mpssh -p 20 -f vms -s -E "pgrep -f run-update-puppet" | grep " -> "

Check for and trigger reboots for machines with new kernel