From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan March Subject: Re: Snmp cpuRawIdle showing double Date: Thu, 07 Apr 2011 11:04:24 -0700 Message-ID: <4D9DFCA8.3060608@gt.net> References: <4D9B8538.8070908@gt.net> <4D9CA833.2060506@gt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D9CA833.2060506@gt.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 4/6/2011 10:51 AM, Nathan March wrote: > Dug into the net-snmp source code to figure out where it pulls that data > from, here's a test case: > > x=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && sleep 60 && > y=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && echo -e > "X:$x\nY:$y\nIDLE:" $(echo "scale=3; ($y-$x)/6000*100" | bc) > > xen1 ~ # x=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && sleep 60 > && y=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && echo -e > "X:$x\nY:$y\nIDLE:" $(echo "scale=3; ($y-$x)/6000*100" | bc) > X:15718848 > Y:15730453 > IDLE: 193.400 > Anyone? Could I ask some people to try running this script on their non-loaded dom0 and see what it returns? x=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && sleep 60 && y=$(cat /proc/stat | grep cpu0 | awk '{print $5}') && echo -e "X:$x\nY:$y\nIDLE:" $(echo "scale=3; ($y-$x)/6000*100" | bc) The Idle output should close to 100% per cpu in the dom0. - Nathan