/[sysadmin-cookbook]/recepies/netpipe-tcp/np2graphviz.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/netpipe-tcp/np2graphviz.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 99 - (hide annotations)
Mon May 25 21:15:25 2009 UTC (14 years, 11 months ago) by dpavlin
File MIME type: text/plain
File size: 356 byte(s)
parse last line of every */*.np file

1 dpavlin 99 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6     foreach my $file ( glob '*/*.np' ) {
7    
8     my $direction = $file;
9     $direction =~ s/\.np$//;
10     my ( $from, $to ) = split(m{/},$direction,2);
11    
12     my $line = `tail -1 $file`;
13     $line =~ s{^\s+}{};
14     $line =~ s{\s+$}{};
15     my ( $size, $speed, $rtt ) = split(/\s+/, $line);
16    
17     warn "$from -> $to | $size | $speed | $rtt\n";
18     }
19    
20    
21    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26