[padb-devel] [padb commit] r109 - Add the number of threads to the process information.

codesite-noreply at google.com codesite-noreply at google.com
Wed Jul 15 22:41:00 BST 2009


Author: apittman
Date: Wed Jul 15 14:39:54 2009
New Revision: 109

Modified:
    branches/full-duplex/src/padb

Log:
Add the number of threads to the process information.


Modified: branches/full-duplex/src/padb
==============================================================================
--- branches/full-duplex/src/padb	(original)
+++ branches/full-duplex/src/padb	Wed Jul 15 14:39:54 2009
@@ -3597,7 +3597,7 @@
  "Unexpected exit from parallel command (state=$comm_data->{state})\n"
          );
      }
-    printf("result from parallel command was $res ($comm_data->{state})\n")
+    printf("result from parallel command is $res  
(state=$comm_data->{state})\n")
        if ( $conf{"verbose"} );

      if ( $res != 0 ) {
@@ -5675,6 +5675,8 @@

      if ( -d "/proc/$pid/task" and $carg->{"proc-shows-proc"} ) {

+        my $threads = 0;
+
          # 2.6 kernel. (ntpl)
          opendir( DIR, "/proc/$pid/task" );
          my @tasks = readdir(DIR);
@@ -5683,7 +5685,9 @@
              next if ( $task eq "." );
              next if ( $task eq ".." );
              show_task_dir( $carg, $vp, $pid, "/proc/$pid/task/$task" );
+            $threads++;
          }
+        proc_output( $vp, "threads", $threads );
      } else {
          show_task_dir( $carg, $vp, $pid, "/proc/$pid" );
      }




More information about the padb-devel mailing list