/[Frey]/trunk/lib/Frey/Shell/sar.pm
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/lib/Frey/Shell/sar.pm

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

revision 877 by dpavlin, Thu Dec 18 13:03:42 2008 UTC revision 891 by dpavlin, Wed Dec 24 21:27:04 2008 UTC
# Line 25  sub as_sponge { Line 25  sub as_sponge {
25          my $cmd = $self->sar_command . ' ' . $opts;          my $cmd = $self->sar_command . ' ' . $opts;
26          warn "# cmd: $cmd";          warn "# cmd: $cmd";
27    
28          my $date = '1970-01-01T';          my $date = '1970-01-01 ';
29    
30          open(my $fh, '-|', $cmd) || die "can't open pipe to $cmd $!";          open(my $fh, '-|', $cmd) || die "can't open pipe to $cmd $!";
31          while(<$fh>) {          while(<$fh>) {
32                  chomp;                  chomp;
33    
34                  if ( m{(\d\d)/(\d\d)/(\d\d\d\d)$} ) {                  if ( m{(\d\d)/(\d\d)/(\d\d\d\d)$} ) {
35                          $date = "$3-$1-$2T";                          $date = "$3-$1-$2 ";
36                          warn "# date $date";                          warn "# date $date";
37                          next;                          next;
38                  }                  }

Legend:
Removed from v.877  
changed lines
  Added in v.891

  ViewVC Help
Powered by ViewVC 1.1.26