File tree Expand file tree Collapse file tree
network/netstats/python_modules Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }))
You can’t perform that action at this time.
0 commit comments