Skip to content

Commit

Permalink
We need out segments for tcp attemptfails :-(
Browse files Browse the repository at this point in the history
  • Loading branch information
vvuksan committed Jan 3, 2013
1 parent a37c665 commit dcd01ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network/netstats/python_modules/netstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_tcpattemptfail_percentage(name):
[curr_metrics, last_metrics] = get_metrics()

try:
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']) )
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']))
if pct < 0:
print name + " is less 0"
pct = 0
Expand Down Expand Up @@ -215,7 +215,7 @@ def metric_init(params):
descriptors.append(create_desc(Desc_Skel, {
"name" : "tcp_attemptfails_percentage",
"call_back" : get_tcpattemptfail_percentage,
"description": "TCP attemptfail percentage, tcpattemptfail / insegs",
"description": "TCP attemptfail percentage, tcpattemptfail / insegs + outsegs",
"units" : "pct",
'groups' : 'tcpext'
}))
Expand Down

0 comments on commit dcd01ec

Please sign in to comment.