From owner-freebsd-current@FreeBSD.ORG Tue Jan 19 06:30:04 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6098B1065679 for ; Tue, 19 Jan 2010 06:30:04 +0000 (UTC) (envelope-from admin@lissyara.su) Received: from hosting.lissyara.su (hosting.lissyara.su [77.221.149.162]) by mx1.freebsd.org (Postfix) with ESMTP id 136208FC0A for ; Tue, 19 Jan 2010 06:30:03 +0000 (UTC) Received: from [195.93.241.18] (port=47645 helo=lissyara.moskb.local) by hosting.lissyara.su with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NX7bG-000Dvd-1u for freebsd-current@freebsd.org; Tue, 19 Jan 2010 09:30:02 +0300 Message-ID: <4B555169.3050801@lissyara.su> Date: Tue, 19 Jan 2010 09:30:01 +0300 From: Alex Keda User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; ru-RU; rv:1.8.1.23) Gecko/20091202 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-White-List: YES X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Descriptions: powered by www.lissyara.su X-Bounce-ID: hosting.lissyara.su Subject: ps -axo user,%cpu,%mem - most processes using 0% of memory X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 06:30:04 -0000 Hi! Modern computers have a large amount of memory. But, in ps(1) source I see: (void)printf("%*.1f", v->width, getpcpu(k)); (void)printf("%*.1f", v->width, getpmem(k)); 0.1% - it very big. for 8Gb ram it = 8mb Many of the processes is less than this number. I attach patch to correct this srv2# diff -Nru bin/ps/print.c ~lissyara/print.c --- bin/ps/print.c 2009-09-07 13:51:23.000000000 +0400 +++ /usr/home/lissyara/print.c 2010-01-19 09:17:25.000000000 +0300 @@ -629,7 +629,7 @@ VAR *v; v = ve->var; - (void)printf("%*.1f", v->width, getpcpu(k)); + (void)printf("%*.2f", v->width, getpcpu(k)); } static double @@ -657,7 +657,7 @@ VAR *v; v = ve->var; - (void)printf("%*.1f", v->width, getpmem(k)); + (void)printf("%*.2f", v->width, getpmem(k)); } void srv2#