Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:TCP metrics value #284

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pkg/exporter/probe/proctcpsummary/proctcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ func collect(pidlist []*nettop.Entity) map[string]map[uint32]uint64 {
tx, rx := summary.getTxRxQueueLength()
tx6, rx6 := summary6.getTxRxQueueLength()
nsinum := uint32(pidlist[idx].GetNetns())
resMap[TCPEstablishedConn][nsinum] = est + est6
resMap[TCPTimeWaitConn][nsinum] = tw + tw6
resMap[TCPCloseWaitConn][nsinum] = cw + cw6
resMap[TCPSynSentConn][nsinum] = ss + ss6
resMap[TCPSynRecvConn][nsinum] = sr + sr6
resMap[TCPTXQueue][nsinum] = tx + tx6
resMap[TCPRXQueue][nsinum] = rx + rx6
resMap[TCPEstablishedConn][nsinum] += est + est6
resMap[TCPTimeWaitConn][nsinum] += tw + tw6
resMap[TCPCloseWaitConn][nsinum] += cw + cw6
resMap[TCPSynSentConn][nsinum] += ss + ss6
resMap[TCPSynRecvConn][nsinum] += sr + sr6
resMap[TCPTXQueue][nsinum] += tx + tx6
resMap[TCPRXQueue][nsinum] += rx + rx6
}

return resMap
Expand Down
Loading