]> git.itanic.dy.fi Git - scan-pagemap/commitdiff
analyzer: print_pid_stats: Add column for total mem usage
authorTimo Kokkonen <kaapeli@itanic.dy.fi>
Fri, 23 Jul 2010 14:45:51 +0000 (17:45 +0300)
committerTimo Kokkonen <kaapeli@itanic.dy.fi>
Fri, 23 Jul 2010 14:45:51 +0000 (17:45 +0300)
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
analyze.c

index 3f3082489ae853e741e0990b7996e53ae1ee5919..67acb2fd8a017d1b91e26e3ffe85c74de6531899 100644 (file)
--- a/analyze.c
+++ b/analyze.c
@@ -112,7 +112,7 @@ void print_pid_stats(struct pageframe *pf, struct process *process_list,
                biggest = MAX(biggest, ps->pages_present + ps->pages_swapped);
        }
 
-       printf("   in ram   swapped   pid");
+       printf("   in ram   swapped     total   pid");
        if (opts->with_threads)
                printf("   tid");
        printf(" name\n");
@@ -136,9 +136,10 @@ restart:
                if (total == 0)
                        continue;
 
-               printf("%6lld %sB %6lld %sB %5d ",
+               printf("%6lld %sB %6lld %sB %6lld %sB %5d ",
                        PAGE_TO_NICE(present), PAGE_TO_NICE_UNIT(present),
                        PAGE_TO_NICE(swapped), PAGE_TO_NICE_UNIT(swapped),
+                       PAGE_TO_NICE(total), PAGE_TO_NICE_UNIT(total),
                        ps->pid);
 
                if (opts->with_threads)