On Thu, Oct 11, 2012 at 20:15:15 +0300, Toomas Aas wrote:
> Which leads me to next question - what is the best way to detect, in
> a script, that amdump or amflush is running? Off the top of my head
> I can only think of something like 'ps | grep amdump', but that
> doesn't seem very elegant. I tried to read amcheck.c to find out how
> Amanda herself does it, but IANAP...

I haven't looked at the code, but as far as I understand Amanda
basically looks in the directory returned by
  amgetconf <CONFIG> logdir
for a file called either "amdump" or "amflush".

Those are created when the given program starts up, and then are renamed
to amdump.1 or amflush.1 when the program finishes.. so if the
"unnumbered" file exists, Amanda assumes the associated program is still
running.

                                                Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Reply via email to