Skip to content

Instantly share code, notes, and snippets.

View actaeon's full-sized avatar

Bill Green actaeon

  • New Relic
  • Portland, Oregon
View GitHub Profile
@actaeon
actaeon / stats dump.md
Created June 18, 2018 18:22
Stats hex dump w/ 0xf1 mask
(gdb) x /3072xb stats
0x7fffffffc6c0:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6c8:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6d0:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6d8:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6e0:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6e8:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6f0:	0x03	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0x7fffffffc6f8:	0xc1	0x00	0x00	0x00	0x00	0x00	0x00	0x00
(gdb) file /usr/local/src/katran/build/katran/lib/testing/katran_tester
Reading symbols from /usr/local/src/katran/build/katran/lib/testing/katran_tester...done.
(gdb) break KatranLb.cpp:692
Breakpoint 1 at 0x13fef3: file /usr/local/src/katran/katran/lib/KatranLb.cpp, line 692.
(gdb) run -balancer_prog /usr/local/src/katran/deps/linux/bpfprog/bpf/balancer_kern.o -test_from_fixtures=true
Starting program: /usr/local/src/katran/build/katran/lib/testing/katran_tester -balancer_prog /usr/local/src/katran/deps/linux/bpfprog/bpf/balancer_kern.o -test_from_fixtures=true
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
E0618 02:50:16.008754 36409 BpfLoader.cpp:160] Can't read section size for index: 2
@actaeon
actaeon / .md
Created June 18, 2018 01:58
github.com/facebookincubator/katran/issues/10 .os_run_tester.sh -v 6
# $(pwd)/build/katran/lib/testing/katran_tester -balancer_prog $(pwd)/deps/linux/bpfprog/bpf/balancer_kern.o -v 6 -test_from_fixtures=true
I0618 01:56:23.285589 36354 BpfLoader.cpp:438] section name: .strtab index: 1
data: 0x5555d4ab5af0 size: 873
link: 0
E0618 01:56:23.285676 36354 BpfLoader.cpp:160] Can't read section size for index: 2
I0618 01:56:23.285683 36354 BpfLoader.cpp:434] Skipping section: 2 of file: /usr/local/src/katran/deps/linux/bpfprog/bpf/balancer_kern.o
I0618 01:56:23.285701 36354 BpfLoader.cpp:438] section name: xdp-balancer index: 3
data: 0x5555d4ab5e70 size: 12496
link: 0
func() {
for _, item := range list.Items {
found := false
for _, reserved := range reserved.Items {
if reserved.ID == item.ID {
found = true
return
}
... do some other work ...
@actaeon
actaeon / gist:2f32caf7e2773a688a4c
Created December 30, 2015 16:59
README for staging DB replicas
chi-staging-account-1b.nr-ops.net 10.1.28.33
chi-staging-account-2b.nr-ops.net 10.1.28.34
chi-staging-agentdb-1c.nr-ops.net 10.1.28.35
chi-staging-agentdb-1d.nr-ops.net 10.1.24.34
chi-staging-agentdb-2c.nr-ops.net 10.1.29.32
chi-staging-agentdb-2d.nr-ops.net 10.1.0.80