From owner-freebsd-hackers Tue Mar 4 15:49:22 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED07437B401 for ; Tue, 4 Mar 2003 15:49:20 -0800 (PST) Received: from digitaldaemon.com (digitaldaemon.com [63.105.9.34]) by mx1.FreeBSD.org (Postfix) with SMTP id C3D0043F75 for ; Tue, 4 Mar 2003 15:49:19 -0800 (PST) (envelope-from jan@digitaldaemon.com) Received: (qmail 28832 invoked from network); 4 Mar 2003 23:47:43 -0000 Received: from unknown (HELO digitaldaemon.com) (192.168.0.220) by digitaldaemon.com with SMTP; 4 Mar 2003 23:47:43 -0000 Message-ID: <3E653CB7.8080306@digitaldaemon.com> Date: Tue, 04 Mar 2003 18:54:31 -0500 From: Jan Knepper Organization: http://www.digitaldaemon.com/ User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030210 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hackers Subject: Re: 'ticks' in kernel. References: <3E64301E.5050901@digitaldaemon.com> <20030304.080123.34121962.imp@bsdimp.com> <3E64E941.3030205@digitaldaemon.com> <20030304.104403.34570707.imp@bsdimp.com> <3E64F7B2.9040008@digitaldaemon.com> <20030304210747.GA29907@lanczos.maths.tcd.ie> In-Reply-To: <20030304210747.GA29907@lanczos.maths.tcd.ie> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Malone wrote: >On Tue, Mar 04, 2003 at 02:00:02PM -0500, Jan Knepper wrote: > > >>How would they return me the 'value' of 'ticks'? >> >>The problem is... I have a value's somewhere that has been assigned from >>'ticks', like: >>ptr -> value = ticks; >> >> > >Maybe it would help to explain what you are doing at a higher level? >It seems odd that you need to do anything like this at all... > > > Well, what I started doing is patching 'netstat' with the idea that I can display: - Time a TCP connection was setup. - Age of a TCP connection. the 'tcpcb' seems to have a member 't_starttime' which could be used for this. However, t_starttime is being initialized from 'ticks'. So to get an result that would make sense to a user I would have to do something like: const time_t boottime; time_t tcptime; tcptime = boottime + ( ticks - tcpcb -> t_starttime ) / FACTOR; The missing part... 'ticks'... Thanks! Jan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message