Marc CARRE
ed4e8aa374
Update import statements to use sirupsen/logrus.
...
Commands run:
```
$ git grep -l Sirupsen | grep -v vendor | xargs sed -i 's:github.com/Sirupsen/logrus:github.com/sirupsen/logrus:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
N.B.: following this commit, build fails with:
```
vendor/github.com/docker/docker/pkg/archive/archive.go:20:2: cannot find package "github.com/Sirupsen/logrus" in any of:
/go/src/github.com/weaveworks/scope/vendor/github.com/Sirupsen/logrus (vendor tree)
/usr/local/go/src/github.com/Sirupsen/logrus (from $GOROOT)
/go/src/github.com/Sirupsen/logrus (from $GOPATH)
```
Resolution in subsequent commit.
2017-10-20 11:47:28 +01:00
Alfonso Acosta
62f2c0920f
Do not read tcp6 files if TCP version 6 isn't supported
2017-06-15 10:16:14 +00:00
Alban Crequy
d715ccc391
ebpf: handle fd_install events from tcptracer-bpf
...
Since https://github.com/weaveworks/tcptracer-bpf/pull/39 , tcptracer-bpf
can generate "fd_install" events when a process installs a new file
descriptor in its fd table. Those events must be requested explicitely
on a per-pid basis with tracer.AddFdInstallWatcher(pid).
This is useful to know about "accept" events that would otherwise be
missed because kretprobes are not triggered for functions that were
called before the installation of the kretprobe.
This patch find all the processes that are currently blocked on an
accept() syscall during the EbpfTracker initialization.
feedInitialConnections() will use tracer.AddFdInstallWatcher() to
subscribe to fd_install events. When a fd_install event is received,
synthesise an accept event with the connection tuple and the network
namespace (from /proc).
2017-05-19 14:49:38 +02:00
Michael Schubert
1d1f7347ce
proc_linux: don't exec getNetNamespacePathSuffix() on every walk
2017-04-19 12:49:04 +02:00
Alfonso Acosta
5c3ea83846
Fix minor typo
2017-01-02 14:28:22 +00:00
Alfonso Acosta
dfb52f0d93
Clarify even further that proc/PID/net/tcp varies by namespace
2017-01-02 14:27:37 +00:00
Jonathan Lange
e8085b01b6
Use 'common' library
2016-12-07 11:22:38 +00:00
Alfonso Acosta
3892273096
Append namespace to endpoint scope for loopback connections
2016-08-10 10:43:04 +00:00
Paul Bellamy
0a910b422d
only check the first two segments of the kernel version
2016-03-15 13:20:15 +00:00
Alfonso Acosta
dfc136904c
Review feedback
2016-02-09 10:00:04 +00:00
Alfonso Acosta
53bc710c4e
Review feedback
2016-02-08 19:28:54 +00:00
Alfonso Acosta
ccabaf5e6a
Use uint64 for fd counter
2016-02-08 13:42:55 +00:00
Alfonso Acosta
6240187333
Fix tests
2016-02-08 13:42:54 +00:00
Alfonso Acosta
6deeca0380
Cleanup
2016-02-08 13:42:53 +00:00
Alfonso Acosta
87dd43f782
Batch rate-limit to stats of /proc/*/fd/*
2016-02-08 13:42:53 +00:00
Alfonso Acosta
f922ea19c8
Rate-limit reading proc files
...
Use a reader in the background, dynamically rate-limited, reading the required
files in a loop
2016-02-08 13:42:52 +00:00
Alfonso Acosta
3d94082b07
Add debug logging
2016-02-05 16:58:40 +00:00
Alfonso Acosta
0ec71e3af7
Minimize race between proc's net/tcp{,6} and fd/*
2016-02-03 12:20:41 +00:00
Alfonso Acosta
e78a64fa15
Fix compilation in darwin
2016-02-02 21:40:27 +00:00