From 368f5cd303917d14b2f253bb24a1e34fe3cf9101 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Oct 2014 23:49:56 +0000 Subject: [PATCH] Print ac_mem and ac_io if available. --- cprogs/acctdump.c | 9 +++++++++ debian/changelog | 1 + 2 files changed, 10 insertions(+) diff --git a/cprogs/acctdump.c b/cprogs/acctdump.c index 77e1896..0cd7a4e 100644 --- a/cprogs/acctdump.c +++ b/cprogs/acctdump.c @@ -53,6 +53,7 @@ typedef struct acct_v3 struct_acct; #include typedef struct acctv2 struct_acct; +#define HAVE_AC_IO_MEM #define FIELD_AC_FLAG(as) ((as)->ac_flagx & ~ANVER) #else @@ -183,6 +184,9 @@ static void printbanner(void) { fputs(" user time sys time elap time " #ifdef HAVE_AC_FLT " minflt maxflt" +#endif +#ifdef HAVE_AC_IO_MEM + " avg.mem io" #endif , stdout); } @@ -303,6 +307,11 @@ static void printrecord(const struct_acct *as, const char *filename) { printf(" %8lu %8lu", (unsigned long)as->ac_minflt, (unsigned long)as->ac_majflt); +#endif +#ifdef HAVE_AC_IO_MEM + printf(" %4e %4e", + as->ac_mem, + as->ac_io); #endif } putchar('\n'); diff --git a/debian/changelog b/debian/changelog index 58d6224..2a36a9f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ chiark-utils (4.4.1) unstable; urgency=low * Tolerate lack of ac_exitcode. * Tolerate lack of ac_minflt and ac_majflt (and use %lu as is right). * Tolerate variation in ac_flag field name, and, to an extent, value. + * Print ac_mem and ac_io if available. -- -- 2.30.2