/[scripts]/trunk/dwm-status.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

Diff of /trunk/dwm-status.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 112 by dpavlin, Wed Apr 1 19:03:33 2009 UTC revision 115 by dpavlin, Fri Jun 19 14:40:14 2009 UTC
# Line 154  while ( 1 ) { Line 154  while ( 1 ) {
154    
155          foreach ( split(/\n/, $net) ) {          foreach ( split(/\n/, $net) ) {
156                  s/^\s+//;                  s/^\s+//;
157                  s/:\s+/:/;                  s/:\s*/ /;
158                  my @n = split(/\s+/, $_, 17);                  my @n = split(/\s+/, $_, 17);
159                  #next unless ( $n[0] =~ s!(eth\d|ath\d):!! );                  #next unless ( $n[0] =~ s!(eth\d|ath\d):!! );
160                  next unless $n[1] =~ m{^\d+$};                  next unless $n[1] =~ m{^\d+$};
161    
162                  warn dump( @n ) if ($debug);                  warn dump( @n ) if ($debug);
163                  $rx += $n[1];                  $rx += $n[1];
164                  $tx += $n[8];                  $tx += $n[9];
165          }          }
166          warn "rx: $rx tx: $tx\n" if ($debug);          warn "rx: $rx tx: $tx\n" if ($debug);
167    

Legend:
Removed from v.112  
changed lines
  Added in v.115

  ViewVC Help
Powered by ViewVC 1.1.26