Skip to content

Commit

Permalink
fix network
Browse files Browse the repository at this point in the history
  • Loading branch information
licong committed Sep 21, 2020
1 parent 775437d commit 4b77942
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,28 @@ hellojukay@local proc (master) $ sudo ./proc -p 765 -f

## show network
```shell
hellojukay@local proc (master) $ sudo ./proc -p 765 -n
hellojukay@local proc (master) $ sudo ./proc -p 757 -n
PROTOCOL STATE LOCAL PORT REMOTE PORT
tcp TCP_ESTABLISHED 10.91.28.69 35450 42.2.21.58 156
tcp TCP_ESTABLISHED 10.91.28.69 35910 42.2.21.58 156
tcp TCP_ESTABLISHED 10.91.28.69 47454 172.24.6.35 443
tcp TCP_ESTABLISHED 10.91.28.69 35516 42.2.21.58 156
tcp TCP_ESTABLISHED 10.91.28.69 33254 42.2.21.58 156
tcp TCP_ESTABLISHED 10.91.28.69 34012 103.41.167.214 443
tcp TCP_ESTABLISHED 10.91.28.69 35476 42.2.21.58 156
tcp6 TCP_LISTEN :: 9090 :: 0
tcp6 TCP_LISTEN :: 7890 :: 0
tcp6 TCP_LISTEN :: 7891 :: 0
tcp6 TCP_LISTEN :: 7892 :: 0
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 59248
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 43126
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 45594
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 45568
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 46028
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 45634
tcp6 TCP_ESTABLISHED ::ffff:0:100:7f7890 ::ffff:0:100:7f 43372
tcp6 TCP_CLOSE :: 7891 :: 0
tcp6 TCP_CLOSE :: 7892 :: 0
```

# install
Expand Down
2 changes: 0 additions & 2 deletions network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ func socketInodes(pid int) []string {
}
var inodes []string
for _, file := range files {
println(file.Link)
println(file.IsSocket())
if file.IsSocket() {
inode, _ := file.Inode()
inodes = append(inodes, inode)
Expand Down

0 comments on commit 4b77942

Please sign in to comment.