mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 02:30:45 +00:00
Fix table column width; ntohl port numbers.
This commit is contained in:
@@ -19,10 +19,6 @@ start_container() {
|
||||
done
|
||||
}
|
||||
|
||||
start_container 1 elasticsearch elasticsearch
|
||||
start_container 2 tomwilkie/searchapp searchapp
|
||||
start_container 1 redis redis
|
||||
start_container 1 tomwilkie/qotd qotd
|
||||
start_container 2 tomwilkie/app app
|
||||
start_container 2 tomwilkie/frontend frontend --add-host=dns.weave.local:$(weave docker-bridge-ip)
|
||||
start_container 1 tomwilkie/client client
|
||||
start_container 1 tomwilkie/app app
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
const (
|
||||
READ = 0
|
||||
WRITE = 1
|
||||
OPEN = 2
|
||||
CLOSE = 3
|
||||
STAT = 4
|
||||
MMAP = 9
|
||||
@@ -101,11 +102,18 @@ func (t *thread) syscallStopped() {
|
||||
case SETROBUSTLIST, GETID, MMAP, MPROTECT, MADVISE, SOCKET, CLONE, STAT, SELECT:
|
||||
return
|
||||
|
||||
case OPEN:
|
||||
return
|
||||
|
||||
default:
|
||||
t.logf("syscall(%d)", t.callRegs.Orig_rax)
|
||||
}
|
||||
}
|
||||
|
||||
func ntohl(b uint16) uint16 {
|
||||
return (b << 8) | ((b & 0xff00) >> 8)
|
||||
}
|
||||
|
||||
func (t *thread) getSocketAddress(ptr uintptr) (addr net.IP, port uint16, err error) {
|
||||
var (
|
||||
buf = make([]byte, syscall.SizeofSockaddrAny)
|
||||
@@ -128,7 +136,7 @@ func (t *thread) getSocketAddress(ptr uintptr) (addr net.IP, port uint16, err er
|
||||
}
|
||||
|
||||
addr = net.IP(sockaddr4.Addr[0:])
|
||||
port = sockaddr4.Port
|
||||
port = ntohl(sockaddr4.Port)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -273,8 +273,15 @@
|
||||
<span class="fa fa-stop" aria-hidden="true"></span> Stop</button>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-sm">
|
||||
<thead><tr><th>Start time</th><th>Duration</th><th>PID<th>From</th><th>To</th><th>Sub-traces</th></tr></thead>
|
||||
<table class="table table-sm">
|
||||
<thead><tr>
|
||||
<th width="25%">Start time</th>
|
||||
<th width="15%">Duration</th>
|
||||
<th width="15%">PID</th>
|
||||
<th width="15%">From</th>
|
||||
<th width="15%">To</th>
|
||||
<th width="15%">Sub-traces</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
{{>traces traces}}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user