From owner-freebsd-stable@FreeBSD.ORG Mon Feb 28 23:30:20 2005 Return-Path: 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 F1B8316A4CE for ; Mon, 28 Feb 2005 23:30:19 +0000 (GMT) Received: from sb.santaba.com (sb.santaba.com [207.154.84.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id B563643D2D for ; Mon, 28 Feb 2005 23:30:19 +0000 (GMT) (envelope-from jbehl@fastclick.com) Received: from [192.168.3.100] (unknown [205.180.85.193]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sb.santaba.com (Postfix) with ESMTP id 8FE4328433; Mon, 28 Feb 2005 15:30:19 -0800 (PST) Message-ID: <4223A9D0.8020105@fastclick.com> Date: Mon, 28 Feb 2005 15:31:28 -0800 From: Jeff Behl User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Nelson References: <422366DE.6020001@fastclick.com> <20050228185042.GH8778@dan.emsphone.com> In-Reply-To: <20050228185042.GH8778@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-stable@freebsd.org Subject: Re: vmstat/iostat/top all fail to report CPU usage X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 23:30:20 -0000 Dan Nelson wrote: >In the last episode (Feb 28), Jeff Behl said: > > >>as reported in bug: bin/60385 >> >>this is still occurring in almost all of our systems, even those at >>stable, and is pretty major issue. any known progress on this? we're >>running ibm e325 servers. >> >>FreeBSD www3 5.3-STABLE FreeBSD 5.3-STABLE #1: Tue Feb 15 10:09:17 PST >>2005 root@www3.cdn.sjc:/usr/obj/usr/src/sys/SMP amd64 >> >> > >Here's the workaround I use on a machine here that loses its stat clock >after a week or so of uptime. Put this in /etc/crontab: > ># Flaky clock. Check it every 5 minutes. >*/5 * * * * root /usr/local/bin/fixrtc > >.. and this in /usr/local/bin/fixrtc: > >#! /bin/sh > ># get the interrupt rate for the stat clock over one second >getticks() { > ( vmstat -i ; sleep 1 ; vmstat -i ) | > awk '/rtc/ { if (sum) sum+=$3; else sum-=$3 } END { print sum }' >} > >ticks=$(getticks) > ># It should be firing at 128 hz. If not, kick it >if [ $ticks -lt 64 ] ; then > echo "Stat clock has died. Attempting to reset." > echo > /etc/rc.d/ntpd stop > echo > /usr/sbin/ntpdate -b ntp.pool.org > echo > /etc/rc.d/ntpd start > echo > echo "RTC interrupt rate is now $(getticks)" >fi > > > > excellent, thanks much Dan. this does the trick nicely and will help a lot. hopefully there'll be a commit for the real fix for 5.4.