public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Willy Tarreau <w@1wt.eu>,
	Nish Aravamudan <nish.aravamudan@gmail.com>,
	Douglas McNaught <doug@mcnaught.org>,
	Patrick Mau <mau@oscar.ping.de>
Subject: Re: Stracing Amanda (was: RSDL for 2.6.21-rc3- 0.29)
Date: Tue, 13 Mar 2007 01:48:35 -0400	[thread overview]
Message-ID: <200703130148.36240.gene.heskett@gmail.com> (raw)
In-Reply-To: <20070313044555.GO943@1wt.eu>

On Tuesday 13 March 2007, Willy Tarreau wrote:
>On Tue, Mar 13, 2007 at 12:04:42AM -0400, Gene Heskett wrote:
>> On Monday 12 March 2007, Nish Aravamudan wrote:
>> >On 3/12/07, Gene Heskett <gene.heskett@gmail.com> wrote:
>> >> On Monday 12 March 2007, Douglas McNaught wrote:
>> >> >Patrick Mau <mau@oscar.ping.de> writes:
>> >> >> Why not temporarly replace "/bin/tar" with a shell script that
>> >> >> does:
>> >> >>
>> >> >> #!/bin/sh
>> >> >> exec strace -f -o output /bin/real.tar $@
>> >> >
>> >> >You beat me to it.  :) I've done that before; it's a great
>> >> > suggestion.
>> >> >
>> >> >Except that if you expect 'tar' to be invoked multiple times in a
>> >> > run, you should probably use 'output.$$' for the output filename
>> >> > so things don't get clobbered.
>> >> >
>> >> >-Doug
>> >>
>> >> In my case, Doug, it will get invoked 64 times, amanda does a dummy
>> >> run to get an estimate, calculates what to do based on that output
>> >> which is 32 runs, 1 per disklist entry and I have 32, and then
>> >> reruns tar with the appropriate level options against each
>> >> individual disklist entry.
>> >>
>> >> But I'm puzzled a bit, what does the double $$ do?, or it buried
>> >> someplace in the bash manpage?  Its not something I've stumbled
>> >> over yet.
>> >
>> >buried indeed:
>> >
>> >"Special Parameters:
>> >  ...
>> >       $      Expands to the process ID of the shell.  In a  ()
>> > subshell,  it expands  to  the  process  ID of the current shell,
>> > not the sub?$B!> shell.
>> >"
>>
>> Well, that's clear enough, but what of the double $$ case?  Would this
>> them make a PID unique to each invocation untill it finally wraps a 16
>> bit value, or will the kernel re-use them because they won't all be
>> running simultainiously, but limited by the number of unique 'spindle'
>> numbers on the system, this to prevent as best as it can, the
>> thrashing of a drive by having tar working on 2 separate (or more)
>> partitions at the same time.  In my case 2 are possible, as /var is on
>> a separate drive.
>
>Yes there a risk of wrapping, but it is very small. You can add the
> command line arguments to the file name if you want, like this :
>
>#!/bin/sh
>exec strace -f -o "output.$$.${*//\//_}" /bin/real.tar $@
>
>It will name the output file "output.<pid>.<args>", replacing slashes
> with underscores. This is very dirty but can help.
>
Excellent Willy, thanks.

>Cheers,
>Willy



-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Whatever doesn't succeed in two months and a half in California will
never succeed.
		-- Rev. Henry Durant, founder of the University of California

  reply	other threads:[~2007-03-13  5:48 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11  1:35 RSDL-mm 0.28 Matt Mackall
2007-03-11  2:28 ` Con Kolivas
2007-03-11  3:16   ` Andrew Morton
2007-03-11  3:43     ` William Lee Irwin III
2007-03-11  3:59     ` Con Kolivas
2007-03-11  3:39       ` Andrew Morton
2007-03-11  3:44         ` Con Kolivas
2007-03-11  4:01   ` Matt Mackall
2007-03-11  4:03     ` Matt Mackall
2007-03-11  6:19       ` Con Kolivas
2007-03-12  5:38         ` RSDL for 2.6.21-rc3- 0.29 Gene Heskett
2007-03-12  5:48           ` Con Kolivas
2007-03-12  6:37             ` Gene Heskett
2007-03-12 10:04               ` Gene Heskett
2007-03-12 12:51                 ` Douglas McNaught
2007-03-12 18:28                   ` Gene Heskett
2007-03-12 18:46                     ` Douglas McNaught
2007-03-12 19:10                       ` Gene Heskett
2007-03-12 19:14                         ` Lee Revell
2007-03-12 19:43                         ` Douglas McNaught
2007-03-12 19:54                           ` Patrick Mau
2007-03-12 20:24                             ` Gene Heskett
2007-03-13  1:32                             ` Stracing Amanda (was: RSDL for 2.6.21-rc3- 0.29) Douglas McNaught
2007-03-13  2:39                               ` Gene Heskett
2007-03-13  3:01                                 ` Nish Aravamudan
2007-03-13  4:04                                   ` Gene Heskett
2007-03-13  4:45                                     ` Willy Tarreau
2007-03-13  5:48                                       ` Gene Heskett [this message]
2007-03-12 13:22   ` RSDL-mm 0.28 David Schwartz
2007-03-12 14:54     ` Ray Lee
2007-03-13  7:22     ` Nick Piggin
2007-03-11  7:32 ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200703130148.36240.gene.heskett@gmail.com \
    --to=gene.heskett@gmail.com \
    --cc=doug@mcnaught.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mau@oscar.ping.de \
    --cc=nish.aravamudan@gmail.com \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox