All of lore.kernel.org
 help / color / mirror / Atom feed
* Repeat a command in background
@ 2010-04-15 14:16 roywoco
  2010-04-15 14:48 ` Daniel Mack
  0 siblings, 1 reply; 2+ messages in thread
From: roywoco @ 2010-04-15 14:16 UTC (permalink / raw)
  To: linux-kernel


I would like to capture the output of vmstat every 10 min into a file. Can
anyone know how I can do it?

Thanks
Roy
-- 
View this message in context: http://old.nabble.com/Repeat-a-command-in-background-tp28255878p28255878.html
Sent from the linux-kernel mailing list archive at Nabble.com.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Repeat a command in background
  2010-04-15 14:16 Repeat a command in background roywoco
@ 2010-04-15 14:48 ` Daniel Mack
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Mack @ 2010-04-15 14:48 UTC (permalink / raw)
  To: roywoco; +Cc: linux-kernel

On Thu, Apr 15, 2010 at 07:16:03AM -0700, roywoco wrote:
> I would like to capture the output of vmstat every 10 min into a file. Can
> anyone know how I can do it?

Very wrong list for such questions, dude. Nevermind ...

#!/bin/sh

file=/tmp/file
while [ true ]; do
	cat /proc/vmstat >> $file
	sleep 600
done


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-15 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 14:16 Repeat a command in background roywoco
2010-04-15 14:48 ` Daniel Mack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.