From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 21 08:32:48 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A0E9106566C for ; Mon, 21 Nov 2011 08:32:48 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 2B8DD8FC08 for ; Mon, 21 Nov 2011 08:32:48 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 812837300A; Mon, 21 Nov 2011 09:30:03 +0100 (CET) Date: Mon, 21 Nov 2011 09:30:03 +0100 From: Luigi Rizzo To: Eugene Grosbein Message-ID: <20111121083003.GA54883@onelab2.iet.unipi.it> References: <4EC39367.4030109@rdtc.ru> <4EC9EE5A.2070204@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EC9EE5A.2070204@grosbein.pp.ru> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: dummynet(4) kernel process CPU usage monitoring X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 08:32:48 -0000 On Mon, Nov 21, 2011 at 01:23:22PM +0700, Eugene Grosbein wrote: > Hi! > > I need to draw graph of dummynet's CPU usage. > "procstat -t 0" shows me TID (thread id) of dummynet kernel thread. > "ps -Hxo time,lwp" shows me total CPU time consumed by this thread. > > Now I see this time has 9 seconds increase during 60 seconds of real time. > This should be 9/60=15% CPU usage, but "top -SHP" shows me 0.00% meantime. apart from the scaling on number of cores (e.g. if you have 8 cores the 15% becomes a bare 2%) remember that percentages are computed with some kind of filtering (EWMA ?) so if the load of dummynet threads is bursty, the filter might eat most of it. not completely sure this explains a steady 0.00%, if that's is what you are seeing cheers luigi > Where is my error? > > Eugene Grosbein > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"