[padb-devel] [padb commit] r90 - When working in --proc-summary mode only send data back from the inner
codesite-noreply at google.com
codesite-noreply at google.com
Thu Jul 2 12:49:19 BST 2009
Author: apittman
Date: Thu Jul 2 03:44:23 2009
New Revision: 90
Modified:
branches/full-duplex/src/padb
Log:
When working in --proc-summary mode only send data back from the inner
processes to the outer if the outer is going to display it. This
greatly reduces the amount of network traffic produced.
Modified: branches/full-duplex/src/padb
==============================================================================
--- branches/full-duplex/src/padb (original)
+++ branches/full-duplex/src/padb Thu Jul 2 03:44:23 2009
@@ -3440,6 +3440,8 @@
if ( $comm_data->{state} ne "shutdown" ) {
printf("Unexpected EOF from $cdata->{fd_desc}
($comm_data->{state})\n");
}
+
+ #printf("Expected EOF from $cdata->{fd_desc} ($comm_data->{state})\n");
}
sub handle_event_from_socket {
@@ -5490,11 +5492,14 @@
}
my $proc_info;
+my %proc_keys;
sub proc_output {
my ( $vp, $key, $value ) = @_;
if ( $confInner{mode} eq "proc-summary" ) {
- $proc_info->{$vp}{ lc($key) } = $value;
+ if ( defined $proc_keys{ lc($key) } ) {
+ $proc_info->{$vp}{ lc($key) } = $value;
+ }
} else {
output( $vp, "$key: $value" );
}
@@ -5502,6 +5507,16 @@
sub show_proc_all {
my ( $carg, $list ) = @_;
+
+ %proc_keys = ();
+
+ if ( defined $carg->{"proc-format"} ) {
+ my @columns = split( ",", $carg->{"proc-format"} );
+ foreach my $column (@columns) {
+ my ( $name, $desc ) = split( "=", $column );
+ $proc_keys{ lc($name) } = 1;
+ }
+ }
$proc_info = undef;
More information about the padb-devel
mailing list