Skip to content

Commit

Permalink
Linux ping may print errors, adapt regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluhm committed Mar 26, 2024
1 parent 69a4061 commit 7768d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netlink.pl
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ sub netbench_parser {
sub pingflood_parser {
my ($line, $log) = @_;
my ($min, $avg, $max, $stddev);
if ($line =~ m{^(\d+) packets transmitted, (\d+) received, ([\.\d]+)% packet loss, time ([\.\d]+)ms$}) {
if ($line =~ m{^(\d+) packets transmitted, (\d+) received,.* ([\.\d]+)% packet loss, time ([\.\d]+)ms$}) {
$pingflood_loss = 0 + $3;
print $tr "SUBVALUE $1 packet transmit\n";
print $tr "SUBVALUE $2 packet receive\n";
Expand Down

0 comments on commit 7768d53

Please sign in to comment.