From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 1 Dec 2014 08:29:53 +0100 From: Gilles Chanteperdrix Message-ID: <20141201072953.GP2964@hermes> References: <314E5ECDAA86314791309FA670550F89C9C4C7FA@SINTEFEXMBX05.sintef.no> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <314E5ECDAA86314791309FA670550F89C9C4C7FA@SINTEFEXMBX05.sintef.no> Subject: Re: [Xenomai] Method for measuring CPU idle time in Xenomai? List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Terje =?utf-8?Q?Fr=C3=B8ysa?= Cc: "xenomai@xenomai.org" On Fri, Nov 28, 2014 at 06:00:27PM +0000, Terje Frøysa wrote: > Dear Sirs, > > I have now four real time processes running and a mix of rt-tasks and Linux tasks. > In a pure Linux environment, CPU idle time can be estimated by: > > awk '{print ($2*100)/$1 " % idle over "$1/60 " min"}' /proc/uptime > > Question: > Will this method apply in an Xenomai environment too? > If not, is there any method that will apply? I am not sure Linux load average calculations stay valid with Xenomai running. For Xenomai tasks, /proc/xenomai/stat will give you the cpu consumption, but all linux activities will appear as the root task, whether idle or not. -- Gilles.