#include <sys/acct.h>
typedef struct acctv2 struct_acct;
+#define HAVE_AC_IO_MEM
#define FIELD_AC_FLAG(as) ((as)->ac_flagx & ~ANVER)
#else
fputs(" user time sys time elap time "
#ifdef HAVE_AC_FLT
" minflt maxflt"
+#endif
+#ifdef HAVE_AC_IO_MEM
+ " avg.mem io"
#endif
, stdout);
}
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');
* 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.
--