--- ps2rrd.pl 2009/07/17 13:43:41 12 +++ ps2rrd.pl 2009/07/17 16:41:12 13 @@ -13,6 +13,7 @@ my $only_veid; my $too_small = 64; # M +my $filter = qr{(apache|mysql|postgres|cgi-bin|SIP)}; GetOptions( 'debug!' => \$debug, @@ -62,11 +63,20 @@ $veid =~ s/^0$/0-hw/; my $s = c('VSZ'); - if ( $s < $too_small ) { + my $cmd = c('COMMAND'); + if ( $cmd =~ $filter ) { + + $veid .= '-' . $1; + $vsz->{$t}->{$veid} += $s * 1024; + print STDERR uc(substr($1,0,1)); + + } elsif ( $s < $too_small ) { + $vsz->{$t}->{$veid}+= $s * 1024; print STDERR "."; + } else { - my $cmd = c('COMMAND'); + $cmd =~ s{-.+$}{}; $cmd =~ s{^/\S+/(\w+?)}{$1}; $cmd =~ s{^\w+ /\S+/(\w+?)}{$1};