From owner-freebsd-questions@FreeBSD.ORG Fri Mar 25 06:47:43 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 8683E16A4CE for ; Fri, 25 Mar 2005 06:47:43 +0000 (GMT) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B27A43D46 for ; Fri, 25 Mar 2005 06:47:42 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-b143.otenet.gr [212.205.244.151]) j2P6l1CK030244; Fri, 25 Mar 2005 08:47:02 +0200 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j2P6lZnI082934; Fri, 25 Mar 2005 08:47:35 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j2P6lZKF082933; Fri, 25 Mar 2005 08:47:35 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 25 Mar 2005 08:47:35 +0200 From: Giorgos Keramidas To: Jonathan Stewart Message-ID: <20050325064734.GA82858@gothmog.gr> References: <20050325035303.41290.qmail@web50903.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050325035303.41290.qmail@web50903.mail.yahoo.com> cc: Dan Nelson 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: Fri, 25 Mar 2005 06:47:43 -0000 On 2005-03-24 19:53, Jonathan Stewart wrote: >--- Dan Nelson wrote: >>In the last episode (Mar 24), Jonathan Stewart said: >>> In that case how would I track how much information a process has >>> actually read from a drive? I occasionally run processes that >>> will read as much as 40+ gig in a single run which takes quite a >>> while and on windows :P I can see "bytes read" and "bytes written" >>> per process which lets me track how much the program has read so >>> far and thus get an idea of how close it is to done. Sorry for >>> the run-on sentence there. >> >> I use lsof, which can tell you the file offset of each open >> filedescriptor. "lsof -o -o20 -p ###" will print all the files >> currently opened by pid ###, and their current offset. > > Hmm, that almost works but the program opens 1000's of files each > time. The program is Unison which is a file synchronizer and I have > it synchronizing files sets >40GB with and 1000's or more files. > Based on your description once the file is closed I can't even tell if > it was read or not :P So, what you are looking for is a single byte count that increases sequentially for all read() and write() system calls?