lkml.org 
[lkml]   [2010]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Repeat a command in background
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



\
 
 \ /
  Last update: 2010-04-15 16:51    [W:0.186 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site