Count traffic per client address and report the busiest ones with the port totals
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b46e0813fe
commit
ed9edbc9fd
7 files changed
+163
-17
No files matched your search
@@ -258,9 +258,7 @@ func (l *listener) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
entry.BytesOut = rec.bytes
|
||||
entry.Millis = time.Since(start).Milliseconds()
|
||||
ms.conns.Add(1)
|
||||
ms.bytesIn.Add(entry.BytesIn)
|
||||
ms.bytesOut.Add(entry.BytesOut)
|
||||
ms.record(r.RemoteAddr, 1, entry.BytesIn, entry.BytesOut)
|
||||
b.logAccess(entry)
|
||||
}()
|
||||
|
||||
|
||||
Reference in new issue
Block a user