--- ps2rrd.pl 2009/07/17 18:35:34 14 +++ ps2rrd.pl 2009/07/19 17:49:55 15 @@ -12,13 +12,15 @@ my $zoom = 2; my $only_veid; +my $by_veid; my $too_small = 64; # M my $filter = qr{(apache|mysql|postgres|cgi-bin|SIP)}; GetOptions( 'debug!' => \$debug, 'zoom=i' => \$zoom, - 'veid=i' => \$only_veid, + 'only-veid=i' => \$only_veid, + 'by-veid!' => \$by_veid, 'size=i' => \$too_small, ); @@ -65,13 +67,13 @@ my $s = c('VSZ'); my $cmd = c('COMMAND'); - if ( $cmd =~ $filter ) { + if ( ! $by_veid && $cmd =~ $filter ) { $veid .= '-' . $1; $vsz->{$t}->{$veid} += $s * 1024; print STDERR uc(substr($1,0,1)); - } elsif ( $s < $too_small ) { + } elsif ( $s < $too_small || $by_veid ) { $vsz->{$t}->{$veid}+= $s * 1024; print STDERR ".";