mirror of https://github.com/aredn/aredn.git
changed maxlines to capture 2days worth of data
This commit is contained in:
parent
e0c2cbbe5d
commit
b9ce490a3c
|
@ -3,13 +3,13 @@ BEGIN {push @INC, '/www/cgi-bin'};
|
|||
use perlfunc;
|
||||
|
||||
my $filename = '/tmp/snrlog';
|
||||
# my $MAXLINES=48960; # 17bytes * 60mins * 24 hours * 2 days
|
||||
my $MAXLINES=132480; # 23bytes * 60mins * 24 hours * 4 days
|
||||
my $MAXLINES=2880; # 2days worth
|
||||
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
|
||||
$d = sprintf ("%02d/%02d %02d:%02d:%02d",$mon, $mday,$hour, $min, $sec);
|
||||
($s, $n) = get_wifi_signal(get_interface("wifi"));
|
||||
$s = $n if $s eq "N/A";
|
||||
$s = 0 if $s eq "N/A";
|
||||
$n = 0 if $n eq "N/A";
|
||||
|
||||
open(my $fh, '>>', $filename) or die "Could not open file '$filename' $!";
|
||||
print $fh "$d,$s,$n\n";
|
||||
|
|
Loading…
Reference in New Issue