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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
test_libbcc is a Catch v1.4.0 host application. | |
Run with -? for options | |
------------------------------------------------------------------------------- | |
test bpf stack_id table | |
------------------------------------------------------------------------------- | |
/home/dale.hamel/workspace/bcc/tests/cc/test_bpf_table.cc:226 | |
............................................................................... |
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/bin/env ruby | |
require 'ruby-static-tracing' | |
DEBUG = ENV['DEBUG'] | |
t = StaticTracing::Tracepoint.new('global', 'hello_nsec', Integer, String) | |
p = StaticTracing::Provider.fetch(t.provider) | |
p.enable | |
l = StaticTracing.nsec |
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
Displaying notes found in: .note.ABI-tag | |
Owner Data size Description | |
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) | |
OS: Linux, ABI: 2.6.24 | |
Displaying notes found in: .note.gnu.build-id | |
Owner Data size Description | |
GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring) | |
Build ID: 2fda2cc264d59b38763507fa44cf79f94636aed2 |
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
#!/bin/bash | |
LSB_FILE="/mnt/root/etc/lsb-release" | |
OS_RELEASE_FILE="/mnt/root/etc/os-release" | |
generate_headers() | |
{ | |
echo "Generating kernel headers" | |
cd ${SOURCES_DIR} | |
zcat /proc/config.gz > .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
#!/usr/bin/env bpftrace | |
/* | |
Watches for all ipv4 tcp accepts, displays: | |
- remote and local addresses of the accepted connection | |
- accept queue size and maximum | |
*/ | |
#include <linux/tcp.h> |
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
--- | |
src/clang_parser.cpp | 14 ++++++++++++++ | |
1 file changed, 14 insertions(+) | |
diff --git a/src/clang_parser.cpp b/src/clang_parser.cpp | |
index 6adb5f0..5b47555 100644 | |
--- a/src/clang_parser.cpp | |
+++ b/src/clang_parser.cpp | |
@@ -221,10 +221,23 @@ void ClangParser::parse(ast::Program *program, StructMap &structs) |
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
./bpftrace /usr/share/shopiftools/acceptqfull.bt | grep -i sock_common | |
Parsed: union sock_common::(anonymous at include/net/sock.h:155:2) parent: ident: skc_addrpair | |
Parsed: sock_common::(anonymous at include/net/sock.h:157:3) parent: ident: skc_daddr | |
Parsed: sock_common::(anonymous at include/net/sock.h:157:3) parent: ident: skc_rcv_saddr | |
Parsed: union sock_common::(anonymous at include/net/sock.h:162:2) parent: ident: skc_hash | |
Parsed: union sock_common::(anonymous at include/net/sock.h:162:2) parent: ident: skc_u16hashes | |
Parsed: union sock_common::(anonymous at include/net/sock.h:167:2) parent: ident: skc_portpair | |
Parsed: sock_common::(anonymous at include/net/sock.h:169:3) parent: ident: skc_dport | |
Parsed: sock_common::(anonymous at include/net/sock.h:169:3) parent: ident: skc_num | |
Parsed: sock_common parent: sock_common ident: skc_family |
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
#!/bin/bash | |
POD_ID=$1 | |
NS_ID=$2 | |
CONTAINER_NAME=$3 | |
shift | |
shift | |
shift | |
container=$(kubectl get pod ${POD_ID} -n ${NS_ID} -o json | jq ".status.containerStatuses[] | select(.name == \"${CONTAINER_NAME}\") | .containerID" | sed -e 's/^"//' -e 's/"$//' | sed 's|docker://||g') |
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
#!/bin/bash | |
POD_ID=$1 | |
NS_ID=$2 | |
CONTAINER_NAME=$3 | |
container=$(kubectl get pod ${POD_ID} -n ${NS_ID} -o json | jq ".status.containerStatuses[] | select(.name == \"${CONTAINER_NAME}\") | .containerID" | sed -e 's/^"//' -e 's/"$//' | sed 's|docker://||g') | |
echo "Container ID is ${container}" |
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
# Enable SNMP | |
USER= | |
PASS= | |
IPMI_HOST= | |
SESSION_ID=$(curl -d "name=${USER}&pwd=${PASS}" "https://${IPMI_HOST}/cgi/login.cgi" --silent --insecure -i | awk '/Set-Cookie/ && NR != 2 { print $2 }') | |
curl -X POST -H "Cookie: ${SESSION_ID}" --insecure "https://${IPMI_HOST}/cgi/op.cgi" -d "&op=config_snmp&en_snmp=on&ver_snmp=v2&rocommunity=public&rwcommunity=public" |