Skip to content

Instantly share code, notes, and snippets.

View rcgoodfellow's full-sized avatar

Ryan Goodfellow rcgoodfellow

View GitHub Profile
@rcgoodfellow
rcgoodfellow / gobgp.log
Created February 27, 2019 04:09
gobgp neighbor slow start
Feb 27 03:53:25 cmdr systemd[1]: Started GoBGP programmable GBP daemon.
Feb 27 03:53:25 cmdr gobgpd[4645]: {"level":"info","msg":"gobgpd started","time":"2019-02-27T03:53:25Z"}
Feb 27 03:53:25 cmdr gobgpd[4645]: {"Topic":"Config","level":"info","msg":"Finished reading the config file","time":"2019-02-27T03:53:25Z"}
Feb 27 03:53:25 cmdr gobgpd[4645]: {"level":"info","msg":"Peer fe80::5054:ff:fe38:e2b3%eth1 is added","time":"2019-02-27T03:53:25Z"}
Feb 27 03:53:25 cmdr gobgpd[4645]: {"Topic":"Peer","level":"info","msg":"Add a peer configuration for:fe80::5054:ff:fe38:e2b3%eth1","time":"2019-02-27T03:53:25Z"}
Feb 27 03:53:25 cmdr gobgpd[4645]: {"Duration":0,"Key":"fe80::5054:ff:fe38:e2b3%eth1","Topic":"Peer","level":"debug","msg":"IdleHoldTimer expired","time":"2019-02-27T03:53:25Z"}
Feb 27 03:53:25 cmdr gobgpd[4645]: {"Key":"fe80::5054:ff:fe38:e2b3%eth1","Topic":"Peer","level":"debug","msg":"state changed","new":"BGP_FSM_ACTIVE","old":"BGP_FSM_IDLE","reason":{"Type":7,"BGPNotification":null,"Data":null},"time":"
message ConfigureRequset {
map<string,string> payload = 1; //resource-uuid ---> xir-node-object
}
message ConfigureResponse {
map<string,Diags> diags = 1; //resource-uuid ---> diagnostics
}
message Diags {
@rcgoodfellow
rcgoodfellow / ceftb-what-how.md
Created February 6, 2018 20:23
ceftb what how

ceftb

What

What ceftb does is best broken down into two categories - what ceftb does for experimenters and what ceftb does for providers.

Experimenters

Expression

ceftb provides mechanisms for expressing experiments at multiple levels.

ansible-playbook 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.12+ (default, Sep 17 2016, 12:08:02) [GCC 6.2.0 20160914]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed 172.22.0.244, inventory source with host_list plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
@rcgoodfellow
rcgoodfellow / domain.go
Created May 2, 2017 09:17
domain.go with domain attributes added
/*
* This file is part of the libvirt-go-xml project
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@rcgoodfellow
rcgoodfellow / mendeley.strace
Created January 14, 2017 19:20
strace of failed mendeleydesktop startup on debian stretch
$ strace mendeleydesktop --verbose-log
execve("/usr/bin/mendeleydesktop", ["mendeleydesktop", "--verbose-log"], [/* 45 vars */]) = 0
brk(NULL) = 0x56332c2ad000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f776a3f1000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=158908, ...}) = 0
mmap(NULL, 158908, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f776a3ca000
close(3) = 0
@rcgoodfellow
rcgoodfellow / mac2ifname.cxx
Last active March 5, 2024 01:40
ask Linux to map a mac address to an interface name through netlink
/*******************************************************************************
*
* mac_2_ifname: given a mac address return the corresponding interface name
*
* usage: mac2ifname <mac>
*
* build: c++ -std=c++14 mac2ifname.cxx -o mac2ifname
*
******************************************************************************/
@rcgoodfellow
rcgoodfellow / glog.sh
Created May 10, 2016 18:01
script to build glog
#!/bin/bash
set -u
set -e
srcdir="${SRCDIR:-/tmp}"
jobs_=`nproc`
config_="--enable-static"
export CXX=clang++
@rcgoodfellow
rcgoodfellow / udev_example.cxx
Created April 27, 2016 21:55
using udev to get physical ethernet device info
/* -----------------------------------------------------------------------------
* This code is an example of how to use udev on linux to get physical
* network interfaces and find out information about them
*
* compiling:
* c++ -std=c++11 udev_example.cxx -o udev_example -ludev
*
* ---------------------------------------------------------------------------*/
#include <iostream>
#include <vector>
import akka.actor.ActorSystem
import java.io.File
import akka.stream.io.{SynchronousFileSink, SynchronousFileSource}
import akka.util.ByteString
import akka.stream.scaladsl.{Source, Sink, Flow, Broadcast, FlowGraph}
import akka.stream.scaladsl.FlattenStrategy
import akka.stream.stage.{PushStage, SyncDirective, TerminationDirective, Context}
import java.util.UUID
import FlowGraph.Implicits._
import akka.stream.scaladsl.Tcp