public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* I/O and Memory accounting...
@ 2005-03-09 13:25 Guillaume Thouvenin
  2005-03-09 18:26 ` Jay Lan
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Thouvenin @ 2005-03-09 13:25 UTC (permalink / raw)
  To: lkml; +Cc: Tim Schmielau, Jay Lan

Hello,

  In the ChangeLog-2.6.11 file I read that the enhanced I/O accounting
data patch and the enhanced memory accounting data collection patch were
added. It's cool but I don't see how this stuff is used because
information is never dump in a file or send to an accounting application
(or I miss something). 
 
  Maybe we should update the ac_io in the "struct acct"? Thus, values
will be dump in the accounting file. Maybe it could be something like:

--- acct.c.orig	2005-03-09 14:17:07.000000000 +0100
+++ acct.c	2005-03-09 14:18:20.000000000 +0100
@@ -477,8 +477,8 @@ static void do_acct_process(long exitcod
 	}
 	vsize = vsize / 1024;
 	ac.ac_mem = encode_comp_t(vsize);
-	ac.ac_io = encode_comp_t(0 /* current->io_usage */);	/* %% */
-	ac.ac_rw = encode_comp_t(ac.ac_io / 1024);
+	ac.ac_io = encode_comp_t(current->rchar + current->wchar);
+	ac.ac_rw = encode_comp_t(0);
 	ac.ac_minflt = encode_comp_t(current->signal->min_flt +
 				     current->group_leader->min_flt);
 	ac.ac_majflt = encode_comp_t(current->signal->maj_flt +


For memory and read/write syscall we may add new fields. 

Best regards,
Guillaume


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: I/O and Memory accounting...
  2005-03-09 13:25 I/O and Memory accounting Guillaume Thouvenin
@ 2005-03-09 18:26 ` Jay Lan
  0 siblings, 0 replies; 2+ messages in thread
From: Jay Lan @ 2005-03-09 18:26 UTC (permalink / raw)
  To: Guillaume Thouvenin; +Cc: lkml, Tim Schmielau, Jay Lan

I thought you planned to read from CSA pacct file?

Well, while we are in discussion of whether to merge and
replace BSD accounting with CSA accounting, your proposed
change will provide you data on charater I/O in a BSD pacct
file. I supposed you do not need to have seperate fields on
character-read and character-written? CSA will provide the
data separately.

CSA writes the data to a CSA pacct file in a similar way as
BSD on exit callback at do_acct_process(). The CSA's exit
callback is implemented as a loadable module. The CSA
project and code can be downloaded at
http://oss.sgi.com/projects/csa.

Cheers,
  - jay


Guillaume Thouvenin wrote:
> Hello,
> 
>   In the ChangeLog-2.6.11 file I read that the enhanced I/O accounting
> data patch and the enhanced memory accounting data collection patch were
> added. It's cool but I don't see how this stuff is used because
> information is never dump in a file or send to an accounting application
> (or I miss something). 
>  
>   Maybe we should update the ac_io in the "struct acct"? Thus, values
> will be dump in the accounting file. Maybe it could be something like:
> 
> --- acct.c.orig	2005-03-09 14:17:07.000000000 +0100
> +++ acct.c	2005-03-09 14:18:20.000000000 +0100
> @@ -477,8 +477,8 @@ static void do_acct_process(long exitcod
>  	}
>  	vsize = vsize / 1024;
>  	ac.ac_mem = encode_comp_t(vsize);
> -	ac.ac_io = encode_comp_t(0 /* current->io_usage */);	/* %% */
> -	ac.ac_rw = encode_comp_t(ac.ac_io / 1024);
> +	ac.ac_io = encode_comp_t(current->rchar + current->wchar);
> +	ac.ac_rw = encode_comp_t(0);
>  	ac.ac_minflt = encode_comp_t(current->signal->min_flt +
>  				     current->group_leader->min_flt);
>  	ac.ac_majflt = encode_comp_t(current->signal->maj_flt +
> 
> 
> For memory and read/write syscall we may add new fields. 
> 
> Best regards,
> Guillaume
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-09 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-09 13:25 I/O and Memory accounting Guillaume Thouvenin
2005-03-09 18:26 ` Jay Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox