20 |
my $file = shift; |
my $file = shift; |
21 |
open(my $fh, '<', $file) || die "$file: $!"; |
open(my $fh, '<', $file) || die "$file: $!"; |
22 |
|
|
|
print STDERR "."; |
|
|
|
|
23 |
my $t = mktime( 0, $5, $4, $3, $2 - 1, $1 - 1900 ) if $file =~ m{(\d\d\d\d)-(\d\d)-(\d\d)/(\d\d)(\d\d)}; |
my $t = mktime( 0, $5, $4, $3, $2 - 1, $1 - 1900 ) if $file =~ m{(\d\d\d\d)-(\d\d)-(\d\d)/(\d\d)(\d\d)}; |
24 |
|
|
25 |
warn "# $file ", -s $file, " bytes [$t]\n" if $debug; |
warn "# $file ", -s $file, " bytes [$t]\n" if $debug; |
52 |
my $s = c('VSZ'); |
my $s = c('VSZ'); |
53 |
if ( $s < $too_small ) { |
if ( $s < $too_small ) { |
54 |
$vsz->{$t}->{$veid}+= $s * 1024; |
$vsz->{$t}->{$veid}+= $s * 1024; |
55 |
|
print STDERR "."; |
56 |
} else { |
} else { |
57 |
my $cmd = c('COMMAND'); |
my $cmd = c('COMMAND'); |
58 |
$cmd =~ s{-.+$}{}; |
$cmd =~ s{-.+$}{}; |
63 |
$veid .= '-' . $cmd; |
$veid .= '-' . $cmd; |
64 |
$veid = substr($veid,0,16); |
$veid = substr($veid,0,16); |
65 |
$vsz->{$t}->{$veid}+= $s * 1024; |
$vsz->{$t}->{$veid}+= $s * 1024; |
66 |
|
print STDERR substr($cmd,0,1); |
67 |
} |
} |
68 |
$veids->{$veid}++; |
$veids->{$veid}++; |
69 |
} |
} |