From owner-freebsd-questions@FreeBSD.ORG Tue Mar 29 16:31:42 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86F9516A4CE for ; Tue, 29 Mar 2005 16:31:42 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id B85EF43D5D for ; Tue, 29 Mar 2005 16:31:41 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])j2TGUxcY027620; Tue, 29 Mar 2005 19:31:00 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) j2TGVdKp098906; Tue, 29 Mar 2005 19:31:39 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)j2TGVdEo098905; Tue, 29 Mar 2005 19:31:39 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 29 Mar 2005 19:31:39 +0300 From: Giorgos Keramidas To: Jonathan Stewart Message-ID: <20050329163139.GA98872@orion.daedalusnetworks.priv> References: <20050326041713.25506.qmail@web50905.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050326041713.25506.qmail@web50905.mail.yahoo.com> cc: freebsd-questions@freebsd.org Subject: Re: Discrepancy between ps -i -o inblk and figuring numbers by hand X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 16:31:42 -0000 On 2005-03-25 20:17, Jonathan Stewart wrote: >--- Giorgos Keramidas wrote: >>On 2005-03-25 10:08, Jonathan Stewart wrote: >>>--- Giorgos Keramidas keramida at ceid dot upatras dot gr wrote: >>>> So, what you are looking for is a single byte count that increases >>>> sequentially for all read() and write() system calls? >>> >>> Pretty much, yes. To be specific all read() and write() calls for a >>> given process. Even something that counted in 512 byte or UFUFSlocks >>> would be useful. >> >> To what end, may I ask? Per process statistics may include byte >> counts from a >> few thousand threads that read and/or write from a few hundred >> descriptors. >> >> Even per file descriptor statistics quickly get useless when one >> considers >> that a single byte read may cause the read-ahead of a few thousand >> bytes or >> that a single write may reach the corresponding device several >> seconds later. > > As I mentioned in an earlier email my main use of this is really just > for one program. I can do a du to find out how much information it > needs to read and then by watching how much it has read get a rough > idea of how much longer it will be. Not really a necessary feature > just a "nice to have" kind of thing. I can try hacking something together, but the main difficulty of making modifications to the struct filedesc of each file descriptor is that userlevel programs need some way of getting access to this information too, i.e. through an ioctl() on the descriptor.