Skip to contentSkip to conversation

PATCH [2.4.2] - CSA Job Accounting Module

PATCH Marlys Kohnke 1 participant 1 message Mar 8, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This patch (linux-2.4.2-csa_module.patch) applies against the 2.4.2 kernel with the PAGG linux-2.4.2-pagg.patch, linux-2.4.2-pagg-job.patch, and linux-2.4.2-csa.patch patches applied first. This CSA patch supports i386 and ia64 platforms.

This patch provides job accounting code which can be compiled directly into the kernel or compiled as a module. The following record types are written:

- start-of-job record (when a new job is initiated)
- end-of-job record (when the last process within a job exits)
- end-of-process record (when a process within a job exits)
- configuration record (when the CSA job accounting configuration changes)
- daemon record (daemon specific events)

These records are processed and grouped by job id outside of the kernel. CSA can be configured to limit the amount and types of records written, including defining thresholds for cpu and memory usage (don't write a record if process usage is below these values).

For further information about CSA job accounting, please read the overview and kernel changes documents available at oss.sgi.com/projects/csa. There is a download link at that site to get the CSA kernel patches, commands packages in rpm and tarball format, and an Admin Guide.

For further information about PAGG and jobs, please see the oss.sgi.com/projects/pagg web site.

----
Marlys Kohnke Silicon Graphics Inc.
[email protected] 655F Lone Oak Drive
(651)683-5324 Eagan, MN 55121

linux-2.4.2-csa_module.patch follows:
-------------------------------------------------------------------------------------

Documentation/Configure.help +9 -7
diff -urN linux-2.4.2.csa+csa-patch/Documentation/Configure.help linux-2.4.2.csa/Documentation/Configure.help
@@ -2758,13 +2758,15 @@
   within system boot uptime periods.  These accounting records are
   then used to produce reports and charge fees to users.
 
-  Say Y here if you want job level accounting to be done by the
-  kernel.  The CSA module needs to be loaded to write the
-  accounting records to a file.  The CSA commands and scripts
-  package needs to be installed to process the CSA accounting
-  records.  See http://oss.sgi.com/projects/csa for further
-  information about CSA and download instructions for the CSA
-  module and commands package.
+  Say Y here if you want job level accounting to be compiled into
+  the kernel.  Say M here if you want the writing of accounting
+  records portion of this feature to be a loadable module.  Say
+  N here if you do not want job level accounting (the default).
+
+  The CSA commands and scripts package needs to be installed to
+  process the CSA accounting records.  See http://oss.sgi.com/projects/csa
+  for further information about CSA and download instructions for the CSA
+  commands package and documentation.
 
 Sysctl support
 CONFIG_SYSCTL
arch/i386/config.in +1 -1
diff -urN linux-2.4.2.csa+csa-patch/arch/i386/config.in linux-2.4.2.csa/arch/i386/config.in
@@ -217,12 +217,12 @@
 
 bool 'System V IPC' CONFIG_SYSVIPC
 bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
-bool 'CSA Job Accounting' CONFIG_CSA_JOB_ACCT
 bool 'Sysctl support' CONFIG_SYSCTL
 bool 'Support for process aggregates (PAGGs)' CONFIG_PAGG
 if [ "$CONFIG_PAGG" = "y" ] ; then
    tristate '    Process aggregate based jobs' CONFIG_PAGG_JOB
 fi
+dep_tristate '    CSA Job Accounting' CONFIG_CSA_JOB_ACCT $CONFIG_PAGG_JOB
 if [ "$CONFIG_PROC_FS" = "y" ]; then
    choice 'Kernel core (/proc/kcore) format' \
 	"ELF		CONFIG_KCORE_ELF	\
arch/ia64/config.in +1 -1
diff -urN linux-2.4.2.csa+csa-patch/arch/ia64/config.in linux-2.4.2.csa/arch/ia64/config.in
@@ -92,12 +92,12 @@
 bool 'Networking support' CONFIG_NET
 bool 'System V IPC' CONFIG_SYSVIPC
 bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
-bool 'CSA Job Accounting' CONFIG_CSA_JOB_ACCT
 bool 'Sysctl support' CONFIG_SYSCTL
 bool 'Support for process aggregates (PAGGs)' CONFIG_PAGG
 if [ "$CONFIG_PAGG" = "y" ] ; then
    tristate '    Process aggregate based jobs' CONFIG_PAGG_JOB
 fi
+dep_tristate '    CSA Job Accounting' CONFIG_CSA_JOB_ACCT $CONFIG_PAGG_JOB
 tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
 
drivers/misc/Makefile +1 -0
diff -urN linux-2.4.2.csa+csa-patch/drivers/misc/Makefile linux-2.4.2.csa/drivers/misc/Makefile
@@ -14,6 +14,7 @@
 export-objs	:= job.o
 
 obj-$(CONFIG_PAGG_JOB) += job.o
+obj-$(CONFIG_CSA_JOB_ACCT) += csa_job_acct.o
 
 include $(TOPDIR)/Rules.make
 
drivers/misc/csa_job_acct.c +1479 -0

1,479 lines not on this page · raw message

include/linux/csa.h +524 -0

524 lines not on this page · raw message