added the section '<map>' to be able to rename the qdisc names in the graph. #74

This commit is contained in:
Jordi Sanfeliu 2015-12-22 09:59:27 +01:00
parent e1561bb0f0
commit 4cc174d8c3
2 changed files with 14 additions and 0 deletions

View File

@ -470,6 +470,9 @@ sub tc_cgi {
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
if($str) {
if($tc->{map}->{$n} || "" eq $str) {
$str = $tc->{map}->{$n};
}
push(@tmpz, "LINE2:sent" . $n . $LC[$n] . ":$str");
$str = sprintf("%-15s", substr($str, 0, 15));
push(@tmp, "LINE2:sent" . $n . $LC[$n] . ":$str");
@ -599,6 +602,9 @@ sub tc_cgi {
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
if($str) {
if($tc->{map}->{$n} || "" eq $str) {
$str = $tc->{map}->{$n};
}
push(@tmpz, "LINE2:drop" . $n . $LC[$n] . ":$str");
$str = sprintf("%-15s", substr($str, 0, 15));
push(@tmp, "LINE2:drop" . $n . $LC[$n] . ":$str");
@ -702,6 +708,9 @@ sub tc_cgi {
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
if($str) {
if($tc->{map}->{$n} || "" eq $str) {
$str = $tc->{map}->{$n};
}
push(@tmpz, "LINE2:over" . $n . $LC[$n] . ":$str");
$str = sprintf("%-15s", substr($str, 0, 15));
push(@tmp, "LINE2:over" . $n . $LC[$n] . ":$str");
@ -809,6 +818,9 @@ sub tc_cgi {
my ($q1, $q2) = (($qdisc[$n] || "") =~ m/\s*(\S+)\s*(.*)\s*/);
my $str = ($q1 || "") . ($q2 ? " $q2" : "");
if($str) {
if($tc->{map}->{$n} || "" eq $str) {
$str = $tc->{map}->{$n};
}
push(@tmpz, "LINE2:requ" . $n . $LC[$n] . ":$str");
$str = sprintf("%-15s", substr($str, 0, 15));
push(@tmp, "LINE2:requ" . $n . $LC[$n] . ":$str");

View File

@ -292,6 +292,8 @@ secure_log_date_format = %b %e
<desc>
eth0 = cbq 1, sfq 10, sfq 20, sfq 30, ingress ffff
</desc>
<map>
</map>
rigid = 0, 0, 0
limit = 1000, 1000, 1000
</tc>