Skip to content

Instantly share code, notes, and snippets.

View drzaeus77's full-sized avatar

Brenden Blanco drzaeus77

  • VMware
  • Palo Alto, CA
View GitHub Profile
@drzaeus77
drzaeus77 / strlen_hist.py
Created January 29, 2016 05:53
Histogram of system-wide calls to strlen
#!/usr/bin/python
from __future__ import print_function
import bcc
import time
text = """
#include <uapi/linux/ptrace.h>
BPF_HISTOGRAM(dist);
int count(struct pt_regs *ctx) {
dist.increment(bpf_log2l(ctx->ax));
#!/usr/bin/python
#
# stacksnoop Trace ext4_sync_fs() function with stack trace.
# For Linux, uses BCC, eBPF. Embedded C.
#
# Written as a proof of concept of stack tracing in bcc/eBPF.
#
# Copyright (c) 2016 Brendan Gregg.
# Licensed under the Apache License, Version 2.0 (the "License")
#

Overview

This walkthrough shows how several open source projects integrate to implement a novel networking solution for docker containers within Mesos.

For a few diagrams of the networking provided here, see these slides.

Relevant repositories mentioned within this guide are: