This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
import requests | |
import json | |
from twilio.rest import Client | |
HEADERS = {'Accept': 'application/vnd.github.inertia-preview+json'} | |
GH_TOKEN = "XXX" # Your auth token from https://github.com/settings/tokens | |
TW_SID = "XXX" # Your Account SID from twilio.com/console | |
TW_TOKEN = "XXX" # Your Auth Token from twilio.com/console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2. Capture a system profile on the host with something like | |
``` | |
sudo perf record -F 99 -a -g -- sleep 30 | |
``` | |
3. From inside the container (easier to have this running already in another shell) dump the symbols for the Java process with | |
``` | |
java -cp attach-main.jar:$JAVA_HOME/lib/tools.jar \ | |
``` | |
``` | |
net.virtualvoid.perf.AttachOnce PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: # add hosts list as needed | |
serial: 1 | |
sudo: true | |
tasks: | |
- name: Copy local grub config to remote host | |
copy: src=./files/grub dest=/etc/default/grub owner=root group=root mode=0644 | |
- name: Recompile grub config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import newrelic.agent | |
newrelic.agent.initialize('staging.ini') | |
newrelic.agent.register_application(timeout=10.0) | |
def add(a, b): | |
return a + b | |
def sub(a, b): | |
return a - b |