I have decided to give a BSD process accounting a try. On the latest
2.1 kernel it doesn't compile because of task_struct no longer contains
the io_usage entry. The following patch makes the BSD process accounting
at least to compile. I am in the middle of kernel compile so I can't tell
whether it really works right now. This patch of course makes the ac_io
and ac_rw entries unusable (equals to zero).
--- linux/kernel/acct.c.orig Fri Feb 6 15:09:11 1998
+++ linux/kernel/acct.c Fri Feb 6 15:10:47 1998
@@ -304,7 +304,11 @@
}
vsize = vsize / 1024;
ac.ac_mem = encode_comp_t(vsize);
+#if 1 /* in 2.1.85 there is no current->io_usage */
+ ac.ac_io = encode_comp_t(0);
+#else
ac.ac_io = encode_comp_t(current->io_usage); /* %% */
+#endif
ac.ac_rw = encode_comp_t(ac.ac_io / 1024);
ac.ac_minflt = encode_comp_t(current->min_flt);
ac.ac_majflt = encode_comp_t(current->maj_flt);
-Yenya
-- \ Jan "Yenya" Kasprzak <kas at fi.muni.cz> http://www.fi.muni.cz/~kas/ \\ PGP: finger kas at aisa.fi.muni.cz 0D99A7FB206605D7 8B35FCDE05B18A5E // \\\ Czech Linux Homepage: http://www.linux.cz/ /// || I find that the algol60 interpreter, teco and jclsh (ibm JCL emulator || || shell) are very good for teaching people that computing has moved on. || || -- Alan Cox in redhat-devel ||- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu