[padb-devel] [padb commit] r88 - Change the default sort order in proc-summary, make mprocs-output

codesite-noreply at google.com codesite-noreply at google.com
Thu Jul 2 12:45:16 BST 2009


Author: apittman
Date: Thu Jul  2 01:41:15 2009
New Revision: 88

Modified:
    branches/full-duplex/src/padb

Log:
Change the default sort order in proc-summary, make mprocs-output
default to undef rather than 0.


Modified: branches/full-duplex/src/padb
==============================================================================
--- branches/full-duplex/src/padb	(original)
+++ branches/full-duplex/src/padb	Thu Jul  2 01:41:15 2009
@@ -2756,9 +2756,9 @@
      my @all  = @_;

      if ( $carg->{"reverse-sort-order"} ) {
-        return ( sort { $a->{$key} <=> $b->{$key} } @all );
-    } else {
          return ( reverse( sort { $a->{$key} <=> $b->{$key} } @all ) );
+    } else {
+        return ( sort { $a->{$key} <=> $b->{$key} } @all );
      }
  }

@@ -2874,7 +2874,7 @@
          }
          my $line = join( $separator, @res );
          print "$line\n";
-        if ( $count and ( --$count == 0 ) ) {
+        if ( defined($count) and ( --$count == 0 ) ) {
              return;
          }
      }
@@ -3380,12 +3380,12 @@
          print("There are $count sockets\n");
          return;
      }
-    print("inner: $line");
+    print("inner: $line\n");
  }

  sub inner_sterr_cb {
      my ( $comm_data, $cdata, $line ) = @_;
-    print("einner: $line");
+    print("einner: $line\n");
  }

  sub eof_from_fd {
@@ -6841,14 +6841,14 @@
              "proc-sort-key"      => "vp",
              "proc-show-header"   => 1,
              "reverse-sort-order" => 0,
-            "nprocs-output"      => 0,
+            "nprocs-output"      => undef,
          },
          'secondary' => [
              {
                  'arg_long' => 'proc-format',
                  'type'     => 's',
                  'default' =>
-'vp=vpid,hostname,pid,vmsize,vmrss,stat.state=S,pcpu=%cpu,name=command'
+'vp=vpid,hostname,pid,vmsize,vmrss,stat.state=S,load1=uptime,pcpu=%cpu,name=command'
              }
            ]





More information about the padb-devel mailing list