Net::Iperf::Parser - Parse a single iperf line result
version 0.04
use Net::Iperf::Parser; my $p = new Net::Iperf::Parser; my @rows = `iperf -c iperf.volia.net -P 2`; foreach (@rows) { $p->parse($_); print $p->dump if ($p->is_valid && $p->is_global_avg); }
and result is something like this
{ is_valid => 1, start => 0, end => 10, duration => 10, speed => 129024, speedk => 126, speedm => 0.123046875, is_process_avg => 1, is_global_avg => 1, }
Parse a single iperf line result in default or CSV mode
Return the start time
Return the end time
Return if the parsed row is a valid iperf row
Return if the row is a process average value
Return if the row is the last summary value
Return the speed calculated in bps
Return the speed calculated in Kbps
Return the speed calculated in Mbps
Return a to_string version of the object (like a Data::Dumper::dumper)
Parse a single iperf line result
Parse a single iperf line result in CSV mode (-y C)
iperf
Emiliano Bruni <info@ebruni.it>
This software is copyright (c) 2019-2023 by Emiliano Bruni.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Net::Iperf::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Iperf::Parser
CPAN shell
perl -MCPAN -e shell install Net::Iperf::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.