Skip to content

Instantly share code, notes, and snippets.

Toms-MacBook-Pro:go_src twilkie$ ssh default
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Thu Dec 10 11:05:14 2015 from 10.0.2.2
vagrant@ubuntu-14:~$ sudo wget -O /usr/local/bin/scope \
> https://github.com/weaveworks/scope/releases/download/latest_release/scope
--2015-12-14 10:51:05-- https://github.com/weaveworks/scope/releases/download/latest_release/scope
Resolving github.com (github.com)... 192.30.252.129
Connecting to github.com (github.com)|192.30.252.129|:443... connected.
This file has been truncated, but you can view the full file.
"=== received SIGQUIT ===\n*** goroutine dump...\ngoroutine 1 [running]:\ngithub.com/weaveworks/cortex/vendor/github.com/weaveworks/common/signals.SignalHandlerLoop(0x7fad603dc168, 0xc4200106e0, 0x0, 0x0, 0x0)\n\t/go/src/github.com/weaveworks/cortex/vendor/github.com/weaveworks/common/signals/signals.go:37 +0x35c\ngithub.com/weaveworks/cortex/server.(*Server).Run(0xc4202c2690)\n\t/go/src/github.com/weaveworks/cortex/server/server.go:110 +0x474\nmain.main()\n\t/go/src/github.com/weaveworks/cortex/cmd/ingester/main.go:52 +0x473\n\ngoroutine 17 [syscall, 13 minutes, locked to thread]:\nruntime.goexit()\n\t/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1\n\ngoroutine 57 [semacquire, 13 minutes]:\nsync.runtime_notifyListWait(0xc42016bb50, 0x0)\n\t/usr/local/go/src/runtime/sema.go:267 +0x122\nsync.(*Cond).Wait(0xc42016bb40)\n\t/usr/local/go/src/sync/cond.go:57 +0x80\ngithub.com/weaveworks/cortex/util.(*PriorityQueue).Dequeue(0xc42016bb00, 0x0, 0x0)\n\t/go/src/github.com/weaveworks/cortex/util/priority_queue.go:96 +0
This file has been truncated, but you can view the full file.
=== received SIGQUIT ===
*** goroutine dump...
goroutine 1 [running]:
github.com/weaveworks/cortex/vendor/github.com/weaveworks/common/signals.SignalHandlerLoop(0x7fad603dc168, 0xc4200106e0, 0x0, 0x0, 0x0)
/go/src/github.com/weaveworks/cortex/vendor/github.com/weaveworks/common/signals/signals.go:37 +0x35c
github.com/weaveworks/cortex/server.(*Server).Run(0xc4202c2690)
/go/src/github.com/weaveworks/cortex/server/server.go:110 +0x474
main.main()
/go/src/github.com/weaveworks/cortex/cmd/ingester/main.go:52 +0x473
=== received SIGQUIT ===
*** goroutine dump...
goroutine 1 [running]:
github.com/weaveworks/cortex/vendor/github.com/weaveworks/common/signals.SignalHandlerLoop(0x7fd2c8475028, 0xc4200106e0, 0x0, 0x0, 0x0)
/go/src/github.com/weaveworks/cortex/vendor/github.com/weaveworks/common/signals/signals.go:37 +0x35c
github.com/weaveworks/cortex/server.(*Server).Run(0xc4202cc1e0)
/go/src/github.com/weaveworks/cortex/server/server.go:110 +0x474
main.main()
/go/src/github.com/weaveworks/cortex/cmd/ingester/main.go:52 +0x473
{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"job":"cortex/distributor"},"values":[[1485466176.9,"137.31395094771457"],[1485466190.9,"219.4759561111111"],[1485466204.9,"259.1972272221111"],[1485466218.9,"229.37777777777774"],[1485466232.9,"199.0222222222222"],[1485466246.9,"203.04678523720278"],[1485466260.9,"187.13333333333333"],[1485466274.9,"174.99790720700034"],[1485466288.9,"172.0888888888889"],[1485466302.9,"195.1800568407693"],[1485466316.9,"240.5423067184209"]]},{"metric":{"job":"cortex/ingester"},"values":[[1485466176.9,"293.24248555555556"],[1485466190.9,"446.16840388888886"],[1485466204.9,"594.4366994444445"],[1485466218.9,"695.613516111111"],[1485466232.9,"886.0871092592594"],[1485466246.9,"1098.3961774074075"],[1485466260.9,"1178.4447366666668"],[1485466274.9,"1156.1333333333332"],[1485466288.9,"1146.1777777777777"],[1485466302.9,"1281.4918982697745"],[1485466316.9,"1366.5019242871845"]]},{"metric":{"job":"cortex/querier"},"values":[[1485463726.9,"0"],[1485463740.9,"0"],
{
"annotations": {
"list": []
},
"editable": true,
"gnetId": null,
"hideControls": false,
"id": null,
"links": [],
"refresh": "10s",
message Metric {
string name
string help
Type type # float64 / int64 / bool / enum
Kind kind # cumulative / gauge / untyped
Structure struct # scalar / historgram / summary
repeated Child children
# Q: list label keys here
goroutine 1234 [running]:
runtime/pprof.writeGoroutineStacks(0x7f9a091736b0, 0xc4292dbc80, 0x4106a9, 0xc4243bb3e0)
/usr/local/go/src/runtime/pprof/pprof.go:650 +0xa7
runtime/pprof.writeGoroutine(0x7f9a091736b0, 0xc4292dbc80, 0x2, 0xc4216e4000, 0x1c39dc0)
/usr/local/go/src/runtime/pprof/pprof.go:639 +0x44
runtime/pprof.(*Profile).WriteTo(0x286c900, 0x7f9a091736b0, 0xc4292dbc80, 0x2, 0xc4292dbc80, 0x16)
/usr/local/go/src/runtime/pprof/pprof.go:310 +0x3e4
net/http/pprof.handler.ServeHTTP(0xc4291cd40d, 0x9, 0x1c47420, 0xc4292dbc80, 0xc4246c6a00)
/usr/local/go/src/net/http/pprof/pprof.go:237 +0x1b8
net/http/pprof.Index(0x1c47420, 0xc4292dbc80, 0xc4246c6a00)
goroutine 5556598 [running]:
runtime/pprof.writeGoroutineStacks(0x7f6cdec40220, 0xc424d23100, 0x4106a9, 0xc43fe315f0)
/usr/local/go/src/runtime/pprof/pprof.go:650 +0xa7
runtime/pprof.writeGoroutine(0x7f6cdec40220, 0xc424d23100, 0x2, 0xc423702400, 0x1c39f20)
/usr/local/go/src/runtime/pprof/pprof.go:639 +0x44
runtime/pprof.(*Profile).WriteTo(0x286c900, 0x7f6cdec40220, 0xc424d23100, 0x2, 0xc424d23100, 0x16)
/usr/local/go/src/runtime/pprof/pprof.go:310 +0x3e4
net/http/pprof.handler.ServeHTTP(0xc427c3ddcd, 0x9, 0x1c47580, 0xc424d23100, 0xc421b4c400)
/usr/local/go/src/net/http/pprof/pprof.go:237 +0x1b8
net/http/pprof.Index(0x1c47580, 0xc424d23100, 0xc421b4c400)
#!/bin/bash
set -e
declare -A cache
f() {
local pkg=$2
local ident=$1
echo "$ident$pkg"