xfs
[Top] [All Lists]

Re: Snapshot regression test [WAS: re[6]: Summary - Snapshot Effort]

To: Greg Freemyer <freemyer@xxxxxxxxxxxxxxxxx>
Subject: Re: Snapshot regression test [WAS: re[6]: Summary - Snapshot Effort]
From: Michael Best <mbest@xxxxxxxxxxxxx>
Date: Tue, 27 Aug 2002 15:23:34 -0600
Cc: Nathan Scott <nathans@xxxxxxx>, linux-xfs@xxxxxxxxxxx
References: <20020827190552.VHDK10702.imf26bis.bellsouth.net@TAZ2>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722
So you're having a problem with the redirection of the & output instead
of the while loop output.

How about this from the LDP about reassigning STDOUT.

#!/bin/bash

exec 6>&1    # Link file descriptor #6 with stdout.
             # Saves stdout.

while true; do
      dd if=/scratch/dummy of=/scratch/junk bs=64k >/dev/null 2>&1
      rm /scratch/junk
      sync
done >/dev/null 2>&1 &

exec 0<&6 6<&-
#  Now restore stdin from fd #6, where it had been saved,
#+ and close fd #6 ( 6<&- ) to free it for other processes to use.
#
# <&6 6<&-    also works.

I wasn't able to reproduce the result mind you.

I would run this script above (without the execs), it would exit
immediately, and then I would go and kill it and I recieved no kill
messages.

Perhaps a better test case would set me straight, this does however
generate a lot of disk I/O.

REF:
http://www.tldp.org/LDP/abs/html/x11693.html#REASSIGNSTDOUT

-Mike

Greg Freemyer wrote:
> Nathan,
> 
> I have the very basics of a new test almost working.  I'm assuming it will be 
> 068.
> 
> One big problem I have is that I start a background infinite loop of dd's to 
> generate some i/o load.
> 
> i.e.
> while true; do
>      dd if=/scratch/dummy of=/scratch/junk bs=64k >/dev/null 2>&1
>      rm /scratch/junk
>      sync
> done >/dev/null 2>&1 &


<Prev in Thread] Current Thread [Next in Thread>