Skip to content

Commit a37c665

Browse files
committed
Shorten the name and don't count outsegs
1 parent f93cad1 commit a37c665

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

network/netstats/python_modules/netstats.py

Lines changed: 5 additions & 5 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']['outsegs']) + float(curr_metrics['data']['tcp']['insegs']) - float(last_metrics['data']['tcp']['insegs']) - float(last_metrics['data']['tcp']['outsegs']))
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']) )
122122
if pct < 0:
123123
print name + " is less 0"
124124
pct = 0
@@ -205,24 +205,24 @@ def metric_init(params):
205205
}))
206206

207207
descriptors.append(create_desc(Desc_Skel, {
208-
"name" : "tcpext_" + "tcploss_percentage",
208+
"name" : "tcpext_tcploss_percentage",
209209
"call_back" : get_tcploss_percentage,
210210
"description": "TCP percentage loss, tcploss / insegs + outsegs",
211211
"units" : "pct",
212212
'groups' : 'tcpext'
213213
}))
214214

215215
descriptors.append(create_desc(Desc_Skel, {
216-
"name" : "tcpext_" + "tcpattemptfail_percentage",
216+
"name" : "tcp_attemptfails_percentage",
217217
"call_back" : get_tcpattemptfail_percentage,
218-
"description": "TCP attemptfail percentage, tcpattemptfail / insegs + outsegs",
218+
"description": "TCP attemptfail percentage, tcpattemptfail / insegs",
219219
"units" : "pct",
220220
'groups' : 'tcpext'
221221
}))
222222

223223

224224
descriptors.append(create_desc(Desc_Skel, {
225-
"name" : "tcp_" + "retrans_percentage",
225+
"name" : "tcp_retrans_percentage",
226226
"call_back" : get_retrans_percentage,
227227
"description": "TCP retrans percentage, retranssegs / insegs + outsegs",
228228
"units" : "pct",

0 commit comments

Comments
 (0)