Skip to content

Instantly share code, notes, and snippets.

View zealws's full-sized avatar

Zeal Wierslee zealws

View GitHub Profile
$ bin/atcd --help
usage: atcd [<flags>]
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--iptables=IPTABLES location of the iptables binary
--ip6tables=IP6TABLES location of the ip6tables binary
--wan=WAN name of the WAN interface
--lan=LAN name of the LAN interface
-b, --listen=127.0.0.1:9090 Bind address for the thrift server
$ make -B bin/atc_api
cd src/react && npm run build-js
> [email protected] build-js /home/zeal/go/src/github.com/facebook/augmented-traffic-control/src/react
> browserify -t [ babelify --presets [ es2015 react ] ] jsx/index.js > ../../static/js/index.js
/home/zeal/go/bin/go-bindata -pkg api -o src/api/bindata.go static/...
/usr/bin/go build -o bin/atc_api github.com/facebook/augmented-traffic-control/src/atc_api
$ go run test.go google.com
173.194.33.163
$ go run test.go 127.0.0.1
127.0.0.1
$ go run test.go netflix.com
174.129.2.58
# systemctl is-enabled say-hello.service
disabled
# systemctl is-enabled say-hello.timer
static
# systemctl status say-hello.service
● say-hello.service - Say hello
Loaded: loaded (/etc/systemd/system/say-hello.service; disabled; vendor preset: disabled)
Active: active (exited) since Tue 2016-04-19 11:26:21 PDT; 19min ago
Apr 22 11:51:00 gannon systemd[1]: Starting Say hello...
Apr 22 11:51:00 gannon echo[18503]: Hello, World!
Apr 22 11:51:00 gannon systemd[1]: Started Say hello.
Apr 22 11:51:01 gannon systemd[1]: Starting Say hello...
Apr 22 11:51:01 gannon echo[18559]: Hello, World!
Apr 22 11:51:01 gannon systemd[1]: Started Say hello.
Apr 22 11:51:02 gannon systemd[1]: Starting Say hello...
Apr 22 11:51:02 gannon echo[18565]: Hello, World!
Apr 22 11:51:02 gannon systemd[1]: Started Say hello.
Apr 22 11:51:03 gannon systemd[1]: Starting Say hello...
root@gannon /home/zeal # journalctl -fu say-hello.service
Apr 25 11:18:01 gannon systemd[1]: Starting Say hello...
Apr 25 11:18:01 gannon echo[17543]: Hello, World!
Apr 25 11:18:01 gannon systemd[1]: Started Say hello.
Apr 25 11:18:02 gannon systemd[1]: Starting Say hello...
Apr 25 11:18:02 gannon echo[17597]: Hello, World!
Apr 25 11:18:02 gannon systemd[1]: Started Say hello.
Apr 25 11:18:03 gannon systemd[1]: Starting Say hello...
Apr 25 11:18:03 gannon echo[17602]: Hello, World!
Apr 25 11:18:03 gannon systemd[1]: Started Say hello.
Apr 25 11:30:01 gannon systemd[1]: Starting Say hello...
Apr 25 11:30:01 gannon echo[7929]: Hello, World!
Apr 25 11:30:01 gannon systemd[1]: Started Say hello.
Apr 25 11:30:02 gannon systemd[1]: Starting Say hello...
Apr 25 11:30:02 gannon echo[7988]: Hello, World!
Apr 25 11:30:02 gannon systemd[1]: Started Say hello.
Apr 25 11:30:03 gannon systemd[1]: Starting Say hello...
Apr 25 11:30:03 gannon echo[7994]: Hello, World!
Apr 25 11:30:03 gannon systemd[1]: Started Say hello.
Apr 25 11:30:04 gannon systemd[1]: Starting Say hello...
2016/05/23 12:38:33 DB: Cleaned 1 empty groups
$ make test
/usr/local/lib/go/bin/go test -v github.com/facebook/augmented-traffic-control/src/daemon
/usr/local/lib/go/bin/go test -v github.com/facebook/augmented-traffic-control/src/api
Running shaping tests as root.
sudo PATH=/home/zeal/.rvm/gems/ruby-1.9.3-p551/bin:/home/zeal/.rvm/gems/ruby-1.9.3-p551@global/bin:/home/zeal/.rvm/rubies/ruby-1.9.3-p551/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/usr/lib/jvm/default/bin:/opt/opencascade/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/zeal/bin:/usr/local/lib/go/bin:/home/zeal/go/bin:/home/zeal/.rvm/bin GOROOT=/usr/local/lib/go GOPATH=/home/zeal/go /usr/local/lib/go/bin/go test -v github.com/facebook/augmented-traffic-control/src/shaping
=== RUN TestCreatesRootQdisc
2016/05/23 14:14:13 warning: Could not delete root qdisc (foo): no such file or directory
--- PASS: TestCreatesRootQdisc (0.01s)
shaping_linux_test.go:386: run_cmd "tc qdisc show dev foo"
qdisc h
# cat /root/blah.timer
[Unit]
Description=Run scheduled task blah
After=network.target
[Timer]
OnCalendar=*:0/5:0
AccuracySec=1s
Persistent=false
RandomizedDelaySec=3600s