Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
opentrafficshaper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Francisco Manuel Cardoso
opentrafficshaper
Commits
75be88e3
Commit
75be88e3
authored
11 years ago
by
Nigel Kukard
Browse files
Options
Downloads
Patches
Plain Diff
Return traffic stats with caps
parent
1f559434
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentrafficshaper/POE/Filter/TCStatistics.pm
+21
-21
21 additions, 21 deletions
opentrafficshaper/POE/Filter/TCStatistics.pm
with
21 additions
and
21 deletions
opentrafficshaper/POE/Filter/TCStatistics.pm
+
21
−
21
View file @
75be88e3
...
...
@@ -39,7 +39,7 @@ use POE::Filter;
use
vars
qw($VERSION @ISA)
;
# NOTE - Should be #.### (three decimal places)
$VERSION
=
'
1.
0
00
';
$VERSION
=
'
1.
3
00
';
@ISA
=
qw(POE::Filter)
;
...
...
@@ -94,39 +94,39 @@ sub get_one
# Pull in all the items
# class htb 1:1 root rate 100000Kbit ceil 100000Kbit burst 51800b cburst 51800b
if
(
@classArray
==
12
)
{
$curstat
->
{'
cir
'}
=
_getKNumber
(
$classArray
[
5
]);
$curstat
->
{'
l
imit
'}
=
_getKNumber
(
$classArray
[
7
]);
$curstat
->
{'
CIR
'}
=
_getKNumber
(
$classArray
[
5
]);
$curstat
->
{'
L
imit
'}
=
_getKNumber
(
$classArray
[
7
]);
# class htb 1:d parent 1:1 rate 10000Kbit ceil 100000Kbit burst 6620b cburst 51800b
}
elsif
(
@classArray
==
13
)
{
$curstat
->
{'
cir
'}
=
_getKNumber
(
$classArray
[
6
]);
$curstat
->
{'
l
imit
'}
=
_getKNumber
(
$classArray
[
8
]);
$curstat
->
{'
CIR
'}
=
_getKNumber
(
$classArray
[
6
]);
$curstat
->
{'
L
imit
'}
=
_getKNumber
(
$classArray
[
8
]);
# class htb 1:3 parent 1:1 prio 7 rate 10000Kbit ceil 100000Kbit burst 6620b cburst 51800b
}
elsif
(
@classArray
==
15
)
{
$curstat
->
{'
p
riority
'}
=
int
(
$classArray
[
6
]);
$curstat
->
{'
cir
'}
=
_getKNumber
(
$classArray
[
8
]);
$curstat
->
{'
l
imit
'}
=
_getKNumber
(
$classArray
[
10
]);
$curstat
->
{'
P
riority
'}
=
int
(
$classArray
[
6
]);
$curstat
->
{'
CIR
'}
=
_getKNumber
(
$classArray
[
8
]);
$curstat
->
{'
L
imit
'}
=
_getKNumber
(
$classArray
[
10
]);
# class htb 1:3 parent 1:1 leaf 3: prio 7 rate 10000Kbit ceil 100000Kbit burst 6620b cburst 51800b
}
elsif
(
@classArray
==
17
)
{
$curstat
->
{'
p
riority
'}
=
int
(
$classArray
[
8
]);
$curstat
->
{'
cir
'}
=
_getKNumber
(
$classArray
[
10
]);
$curstat
->
{'
l
imit
'}
=
_getKNumber
(
$classArray
[
12
]);
$curstat
->
{'
P
riority
'}
=
int
(
$classArray
[
8
]);
$curstat
->
{'
CIR
'}
=
_getKNumber
(
$classArray
[
10
]);
$curstat
->
{'
L
imit
'}
=
_getKNumber
(
$classArray
[
12
]);
}
else
{
next
;
}
(
$curstat
->
{'
_c
lass
_p
arent
'},
$curstat
->
{'
_c
lass
_c
hild
'})
=
split
(
/:/
,
$classArray
[
2
]);
(
$curstat
->
{'
TCC
lass
P
arent
'},
$curstat
->
{'
TCC
lass
C
hild
'})
=
split
(
/:/
,
$classArray
[
2
]);
# Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
# rate 0bit 0pps backlog 0b 0p requeues 0
if
(
@statsArray
==
19
)
{
$curstat
->
{'
t
otal
_b
ytes
'}
=
int
(
$statsArray
[
1
]);
$curstat
->
{'
t
otal
_p
ackets
'}
=
int
(
$statsArray
[
3
]);
$curstat
->
{'
t
otal
_d
ropped
'}
=
int
(
$statsArray
[
6
]);
$curstat
->
{'
t
otal
_o
verlimits
'}
=
int
(
$statsArray
[
8
]);
$curstat
->
{'
r
ate
'}
=
_getKNumber
(
$statsArray
[
12
]);
$curstat
->
{'
pps
'}
=
int
(
substr
(
$statsArray
[
13
],
0
,
-
3
));
$curstat
->
{'
q
ueue
_s
ize
'}
=
int
(
substr
(
$statsArray
[
15
],
0
,
-
1
));
$curstat
->
{'
q
ueue
_l
en
'}
=
int
(
substr
(
$statsArray
[
16
],
0
,
-
1
));
$curstat
->
{'
T
otal
B
ytes
'}
=
int
(
$statsArray
[
1
]);
$curstat
->
{'
T
otal
P
ackets
'}
=
int
(
$statsArray
[
3
]);
$curstat
->
{'
T
otal
D
ropped
'}
=
int
(
$statsArray
[
6
]);
$curstat
->
{'
T
otal
O
verlimits
'}
=
int
(
$statsArray
[
8
]);
$curstat
->
{'
R
ate
'}
=
_getKNumber
(
$statsArray
[
12
]);
$curstat
->
{'
PPS
'}
=
int
(
substr
(
$statsArray
[
13
],
0
,
-
3
));
$curstat
->
{'
Q
ueue
S
ize
'}
=
int
(
substr
(
$statsArray
[
15
],
0
,
-
1
));
$curstat
->
{'
Q
ueue
L
en
'}
=
int
(
substr
(
$statsArray
[
16
],
0
,
-
1
));
}
else
{
next
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment