[PATCH] blkparse: include pid in stat output
authorJens Axboe <axboe@suse.de>
Wed, 21 Sep 2005 09:46:51 +0000 (11:46 +0200)
committerJens Axboe <axboe@suse.de>
Wed, 21 Sep 2005 09:46:51 +0000 (11:46 +0200)
Avoids name conflict with threads.

blkparse.c

index d3e5a545afcacbee5ac28d01a0b83946b863cf52..b5d359f5f62dfd134ba5dac79092fbe5e294d173 100644 (file)
@@ -1238,7 +1238,10 @@ static void show_process_stats(void)
 
        ppi = ppi_list;
        while (ppi) {
-               dump_io_stats(&ppi->io_stats, ppi->name);
+               char name[64];
+
+               snprintf(name, sizeof(name)-1, "%s (%u)", ppi->name, ppi->pid);
+               dump_io_stats(&ppi->io_stats, name);
                dump_wait_stats(ppi);
                ppi = ppi->list_next;
        }