From owner-freebsd-stable@FreeBSD.ORG Thu Nov 16 19:45:34 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72C0016A4D8 for ; Thu, 16 Nov 2006 19:45:34 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DFB443D96 for ; Thu, 16 Nov 2006 19:45:19 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so488405uge for ; Thu, 16 Nov 2006 11:45:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=IaOzr5/7ZKmzIXPBlMwP+nv8Eo0jYXC7hyt6BeXHBwf9uV9K11rnM2ukb2iYG6wW2SQbz63TF9fuqmhTA9SmF7A/S3HKSIn+y4Lj5SrfEgu2qCQ98Znp6ebESliY4QqEIAcpmjzIw7sgiH9XbY/MVSX+H1WYjnzN8g6/VaedKcc= Received: by 10.66.243.2 with SMTP id q2mr1415930ugh.1163706308605; Thu, 16 Nov 2006 11:45:08 -0800 (PST) Received: from roadrunner.q.local ( [85.180.188.41]) by mx.google.com with ESMTP id g30sm2942056ugd.2006.11.16.11.45.07; Thu, 16 Nov 2006 11:45:08 -0800 (PST) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.8/8.13.8) with ESMTP id kAGJAb9B002764; Thu, 16 Nov 2006 20:10:37 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.8/8.13.8/Submit) id kAGJAbKp002763; Thu, 16 Nov 2006 20:10:37 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Thu, 16 Nov 2006 20:10:37 +0100 From: Ulrich Spoerlein To: Ruslan Ermilov Message-ID: <20061116191037.GA1515@roadrunner.q.local> Mail-Followup-To: Ruslan Ermilov , stable@freebsd.org References: <7ad7ddd90611160255m553a471cy41f6c911bdc2a1bf@mail.gmail.com> <20061116150309.GD48412@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061116150309.GD48412@rambler-co.ru> Cc: stable@freebsd.org Subject: Re: systat -vm output showing negative total virtual memory X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:45:34 -0000 Ruslan Ermilov wrote: > sysctl(8) knows that t_vm is in bytes, but for the other stats > it thinks they are in pages. "systat -vm" thinks they are all > in bytes. Here's a fix: Thanks!, I applied your patch to RELENG_6 # sysctl vm.vmtotal ; ./sysctl vm.vmtotal vm.vmtotal: System wide totals computed every five seconds: (values in kilobytes) =============================================== Processes: (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 45) Virtual Memory: (Total: 797461K, Active 92512K) Real Memory: (Total: 3327992K Active 48124K) Shared Virtual Memory: (Total: 11856K Active: 7772K) Shared Real Memory: (Total: 7644K Active: 5364K) Free Memory Pages: 145964K vm.vmtotal: System wide totals computed every five seconds: (values in kilobytes) =============================================== Processes: (RUNQ: 1 Disk Wait: 0 Page Wait: 0 Sleep: 45) Virtual Memory: (Total: 797461K, Active 22K) Real Memory: (Total: 3327992K Active 48128K) Shared Virtual Memory: (Total: 2K Active: 1K) Shared Real Memory: (Total: 7644K Active: 5364K) Free Memory Pages: 145964K 22K active VM and 1K shared? Seems pretty low to me... Here's the systat -vm output Mem:KB REAL VIRTUAL Tot Share Tot Share Free Act 48384 5424 92800 7844 145692 count All 3328264 7704-1028565k 11928 pages Mem:KB REAL VIRTUAL Tot Share Tot Share Free Act 48464 5372 22 1 145692 count All 3328264 7652 797461 2 pages The total value seems more sane, but I doubt the active total value. top(1) says 106 processes: 3 running, 80 sleeping, 1 zombie, 22 waiting CPU states: 8.9% user, 0.0% nice, 11.4% system, 0.8% interrupt, 78.9% idle Mem: 48M Active, 2834M Inact, 239M Wired, 133M Cache, 112M Buf, 4680K Free Swap: 1024M Total, 36K Used, 1024M Free Yes, the system is totally idle, that may explain the values above. If your fix is correct (sorry, but I'm not in a position to judge your work), would it be possible to have a quick MFC to RELENG_6 and RELENG_6_2? Ulrich Spoerlein -- A: Yes. >Q: Are you sure? > >A: Because it reverses the logical flow of conversation. > >>Q: Why is top posting frowned upon?