}
# if prefixed with _ it will be hiddden from output, _args must be last!
-my @ps_cols = qw( user pid pcpu pmem vsz cputime etimes _args);
+my @ps_cols = qw( user pid
+ pcpu pmem
+ vsz
+ rss
+ nlwp
+ cputime etimes
+ maj_flt min_flt
+ psr
+
+ _args);
sub ps_cols_all { map { my $t = $_; $t =~ s/^_//; $t } @ps_cols };
sub ps_cols_visible { grep { ! /^_/ } @ps_cols };
my %h;
@h{@ps_cols} = split(/\s+/, $_, $#ps_cols + 1);
+ $h{cputime} = DD_hh_mm_ss( $h{cputime} );
#XXX 'h = ', \%h;
if ( $h{user} =~ m/gnt/ && $h{_args} =~ m/qemu.*-name\s+(\S+)/ ) {
my $name = $1;
$stat->{$name}->{$_} = $h{$_} foreach ps_cols_all;
- $stat->{$name}->{cputime_} = $stat->{$name}->{cputime} = DD_hh_mm_ss( $stat->{$name}->{cputime} );
-
while ( $h{_args} =~ m/mac=([0-9a-fA-F:]+)/g ) {
$mac_to_name->{$1} = $name;
}
} else {
# warn "## SKIP [$_]\n";
- $stat->{ '__' . $hostname }->{$_} += $h{$_} foreach qw( pcpu pmem vsz );
+ $stat->{ '__' . $hostname }->{$_} += $h{$_} foreach qw( pcpu pmem vsz rss cputime etimes maj_flt min_flt );
}