mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +00:00
wifi-diag: Don't open per-tid stats files.
We were not using them, and opening more than 1024 crashed the script due to ulimit issues.
This commit is contained in:
@@ -43,6 +43,9 @@ sub new {
|
||||
|
||||
bless($self, $class);
|
||||
|
||||
if (0) { # Skip per-tid reporting files for now.
|
||||
# I am seeing failure due to > 1024 files being opened, and we don't
|
||||
# use these anyway...
|
||||
my $rpt_fname = $self->{report_prefix} .
|
||||
"tid-" . $self->tidno() . "-" .
|
||||
$self->{addr_a} . "." .
|
||||
@@ -57,6 +60,7 @@ sub new {
|
||||
$rpt_fname = $self->{report_prefix} . "tid-" . $self->tidno() . "-" . $self->{addr_a} . "." . $self->{addr_b} . "-ba-rpt.txt";
|
||||
open(my $BA, ">", $rpt_fname) or die("Can't open $rpt_fname for writing: $!\n");
|
||||
$self->{fh_ba} = $BA;
|
||||
}
|
||||
|
||||
return $self;
|
||||
}
|
||||
@@ -202,7 +206,7 @@ sub add_pkt {
|
||||
}
|
||||
|
||||
my $new_ba = $ba_tot - $ba_dup;
|
||||
my $fh_ba = $self->{fh_ba};
|
||||
#my $fh_ba = $self->{fh_ba};
|
||||
my $ts_diff;
|
||||
if ($last_timestamp == 0) {
|
||||
$ts_diff = "0.0";
|
||||
@@ -212,7 +216,7 @@ sub add_pkt {
|
||||
}
|
||||
my $ln = "" . $pkt->timestamp() . "\t" . $self->tidno() . "\t$ba_tot\t$ba_dup\t$new_ba\t$ts_diff\n";
|
||||
|
||||
print $fh_ba $ln; # Tid specific data file
|
||||
#print $fh_ba $ln; # Tid specific data file
|
||||
print $glb $ln; # Global data file
|
||||
}# if block-ack frame
|
||||
|
||||
@@ -234,6 +238,7 @@ sub add_pkt {
|
||||
last;
|
||||
}
|
||||
|
||||
if (0) { # Skip per-tid reporting files for now...global info seems enough
|
||||
my $tsp1 = $self->{last_ps_timestamp} + 1.0;
|
||||
my $gen_ps = $tsp1 < $pkt->{timestamp};
|
||||
#print STDERR "last-ps-timestamp: " . $self->{last_ps_timestamp} . " tsp1: $tsp1 gen-ps: $gen_ps "
|
||||
@@ -290,6 +295,7 @@ sub add_pkt {
|
||||
my $ln = "" . $pkt->timestamp() . "\t" . $self->tidno() . "\t" . $pkt->datarate() . "\t" . $pkt->retrans() . "\n";
|
||||
|
||||
print $fh $ln;
|
||||
}
|
||||
|
||||
push(@{$self->{pkts}}, $pkt);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user