Date: Fri, 25 Apr 2008 09:31:05 GMT From: Vladimir Kozbin <wawaka@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/123069: invalid value of 'elapsed' field in ps output if process is swapped out Message-ID: <200804250931.m3P9V554060213@www.freebsd.org> Resent-Message-ID: <200804250940.m3P9e1MI030622@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 123069 >Category: bin >Synopsis: invalid value of 'elapsed' field in ps output if process is swapped out >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 25 09:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Vladimir Kozbin >Release: 7.0-RELEASE >Organization: >Environment: FreeBSD titan.lan 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Mar 2 20:16:34 UTC 2008 root@titan:/usr/obj/usr/src/sys/TITAN amd64 >Description: The problem is described here: http://lists.freebsd.org/pipermail/freebsd-stable/2008-April/042154.html And the explanation is here: http://lists.freebsd.org/pipermail/freebsd-stable/2008-April/042157.html >How-To-Repeat: >Fix: Patch attached with submission follows: --- print.c.orig 2007-09-17 09:27:18.000000000 +0400 +++ print.c 2008-04-25 13:11:06.994706727 +0400 @@ -559,6 +559,10 @@ elapsed(KINFO *k, VARENT *ve) char obuff[128]; v = ve->var; + if (!k->ki_valid) { + (void)printf("%-*s", v->width, "-"); + return; + } val = now - k->ki_p->ki_start.tv_sec; days = val / (24 * 60 * 60); val %= 24 * 60 * 60; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804250931.m3P9V554060213>