Skip to content

Commit dcd01ec

Browse files
committed
We need out segments for tcp attemptfails :-(
1 parent a37c665 commit dcd01ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

network/netstats/python_modules/netstats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def get_tcpattemptfail_percentage(name):
118118
[curr_metrics, last_metrics] = get_metrics()
119119

120120
try:
121-
pct = 100 * (float(curr_metrics['data']['tcp']["attemptfails"]) - float(last_metrics["data"]['tcp']["attemptfails"])) / ( float(curr_metrics['data']['tcp']['insegs']) - float(last_metrics['data']['tcp']['insegs']) )
121+
pct = 100 * (float(curr_metrics['data']['tcp']["attemptfails"]) - float(last_metrics["data"]['tcp']["attemptfails"])) / (float(curr_metrics['data']['tcp']['outsegs']) + float(curr_metrics['data']['tcp']['insegs']) - float(last_metrics['data']['tcp']['insegs']) - float(last_metrics['data']['tcp']['outsegs']))
122122
if pct < 0:
123123
print name + " is less 0"
124124
pct = 0
@@ -215,7 +215,7 @@ def metric_init(params):
215215
descriptors.append(create_desc(Desc_Skel, {
216216
"name" : "tcp_attemptfails_percentage",
217217
"call_back" : get_tcpattemptfail_percentage,
218-
"description": "TCP attemptfail percentage, tcpattemptfail / insegs",
218+
"description": "TCP attemptfail percentage, tcpattemptfail / insegs + outsegs",
219219
"units" : "pct",
220220
'groups' : 'tcpext'
221221
}))

0 commit comments

Comments
 (0)