mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Merge pull request #770 from weaveworks/missing-pids
We need to read /proc/PID/net/tcp6 to see the pids for the server end of local connections.
This commit is contained in:
@@ -42,8 +42,9 @@ func walkProcPid(buf *bytes.Buffer, walker process.Walker) (map[uint64]*Proc, er
|
||||
}
|
||||
hasConns, ok := namespaces[statT.Ino]
|
||||
if !ok {
|
||||
read, err := readFile(filepath.Join(procRoot, dirName, "/net/tcp"), buf)
|
||||
hasConns = err == nil && read > 0
|
||||
read, _ := readFile(filepath.Join(procRoot, dirName, "/net/tcp"), buf)
|
||||
read6, _ := readFile(filepath.Join(procRoot, dirName, "/net/tcp6"), buf)
|
||||
hasConns = read+read6 > 0
|
||||
namespaces[statT.Ino] = hasConns
|
||||
}
|
||||
if !hasConns {
|
||||
|
||||
Reference in New Issue
Block a user