/[ps-trend]/ps2rrd.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 /ps2rrd.pl

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

revision 12 by dpavlin, Fri Jul 17 13:43:41 2009 UTC revision 13 by dpavlin, Fri Jul 17 16:41:12 2009 UTC
# Line 13  my $zoom = 2; Line 13  my $zoom = 2;
13    
14  my $only_veid;  my $only_veid;
15  my $too_small = 64;     # M  my $too_small = 64;     # M
16    my $filter = qr{(apache|mysql|postgres|cgi-bin|SIP)};
17    
18  GetOptions(  GetOptions(
19          'debug!'   => \$debug,          'debug!'   => \$debug,
# Line 62  sub count { Line 63  sub count {
63                  $veid =~ s/^0$/0-hw/;                  $veid =~ s/^0$/0-hw/;
64    
65                  my $s = c('VSZ');                  my $s = c('VSZ');
66                  if ( $s < $too_small ) {                  my $cmd = c('COMMAND');
67                    if ( $cmd =~ $filter ) {
68    
69                            $veid .= '-' . $1;
70                            $vsz->{$t}->{$veid} += $s * 1024;
71                            print STDERR uc(substr($1,0,1));
72    
73                    } elsif ( $s < $too_small ) {
74    
75                          $vsz->{$t}->{$veid}+= $s * 1024;                          $vsz->{$t}->{$veid}+= $s * 1024;
76                          print STDERR ".";                          print STDERR ".";
77    
78                  } else {                  } else {
79                          my $cmd = c('COMMAND');  
80                          $cmd =~ s{-.+$}{};                          $cmd =~ s{-.+$}{};
81                          $cmd =~ s{^/\S+/(\w+?)}{$1};                          $cmd =~ s{^/\S+/(\w+?)}{$1};
82                          $cmd =~ s{^\w+ /\S+/(\w+?)}{$1};                          $cmd =~ s{^\w+ /\S+/(\w+?)}{$1};

Legend:
Removed from v.12  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.26