From: Yusuke KANEKI Subject: [PATCH] Add periodic fflush to xentop batch mode. Date: Fri, 14 Mar 2008 21:38:23 +0900 Message-ID: <20080314123850.21294.qmail@LeakStopper> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: 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 Add periodic fflush to xentop(batch mode). If you want to make monitor tool using the following command, you can not get output every some seconds. xentop -b -d 1 > xentop.log (above tool use tail command to get periodic data from xentop.log) This patch is useful when you get xentop output(batch mode) periodicaly using pipe. Best Regards, Yusuke Kaneki ---- *** old/xentop.c 2008-03-14 21:00:28.000000000 +0900 --- new/xentop.c 2008-03-14 21:00:36.000000000 +0900 *************** *** 1121,1126 **** --- 1121,1127 ---- do { gettimeofday(&curtime, NULL); top(); + fflush(stdout); oldtime = curtime; if ((!loop) && !(--iterations)) break;